Support » Fixing WordPress » Post losing line breaks.

  • I’m trying to display post number 54 outside of “The Loop” by using this code …

    $educational_id = 54;
    $post_educational = get_post($educational_id);
    $educational_title = $post_educational->post_title;
    echo "<h1><a href='#'>$educational_title</a></h1>";
    $content_educational = $post_educational->post_content;
    $content_educational = str_replace(']]>', ']]>', $content_educational);
    echo $content_educational;

    But it does not look quite like my regular posts. The paragraphs are all running together as if it is missing the <p> tags.

    Is there an easier way to display a particular post outside of the loop?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Post losing line breaks.’ is closed to new replies.