WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] post->post_content (6 posts)

  1. amazon3d
    Member
    Posted 1 year ago #

    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; ?>

  2. example:

    <?php $id="33-2"; $post = get_page($id); echo apply_filters('the_content', $post->post_content); ?>
  3. amazon3d
    Member
    Posted 1 year ago #

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

  4. amazon3d
    Member
    Posted 1 year ago #

  5. amazon3d
    Member
    Posted 1 year ago #

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

  6. amazon3d
    Member
    Posted 1 year ago #

    <?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.

Topic Closed

This topic has been closed to new replies.

About this Topic