Support » Plugins and Hacks » the_content() in template always empty

  • Resolved remino

    (@remino)


    Developing a new template, I’m trying to output the content by using the_content(). However, it always displays nothing. However, $post->post_content does contain the unfiltered post content.

    Anything I’m missing?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I added a line, setup_postdata($post), in my template, and that did it. I’m surprised I have to do that, since the_title() works just fine, with and without the added line.

    Did you start your loop first? Right after the loop begins, do you call the_post()?

    The_Loop

    Is that what the_post() does? I see…

    I just tried it and it works. Thank you! I guess I still have a lot to learn.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘the_content() in template always empty’ is closed to new replies.