Support » Fixing WordPress » post->post_content

  • Resolved amazon3d

    (@amazon3d)


    I have a index page that pulls some of its content from another page.
    The issue that I am having is the content it is pulling is not getting formatted correctly. When I pull it over it crunches the text together are removes the <p> spacing.

    This is the code I use.

    <?php $id="33-2"; $post = get_page($id); echo $post->post_content; ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    example:

    <?php $id="33-2"; $post = get_page($id); echo apply_filters('the_content', $post->post_content); ?>
    amazon3d

    (@amazon3d)

    That still does not appear to do it.
    New lines are not starting like they should.

    amazon3d

    (@amazon3d)

    amazon3d

    (@amazon3d)

    I take that back, THANK YOU. I forgot to hit upload before I refreshed page lol.

    amazon3d

    (@amazon3d)

    <?php $id="33-2"; $post = get_page($id); echo apply_filters('the_content', $post->post_content); ?>

    Resolved the issue, I had seen the code elsewhere but didn’t think to try it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘post->post_content’ is closed to new replies.