I’m trying to create a single “sticky” for a weekly podcast (postcasts are category 39) at the top of my blog. I want to display the title and the text. I can get the title to show up, but the text (the_content()) is blank.
The same post shows up in the more conventional loop in the main part of the blog. What’s wrong?
<?php $myposts = get_posts('numberposts=1&category=39'); foreach($myposts as $post) : ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_content(); ?> <?php endforeach; ?>
the_permalink() and the_title() work fine, but the_content() returns nothing.
- The topic ‘The_Content() and recent post in category’ is closed to new replies.