• If someone could help me figure out what I am doing wrong, I would be very grateful. I am trying to grab the latest post from a particular category and display it on the sidebar (varying the Manji2 theme). Here’s my code:

    <?php $posts =
    get_posts('order=ASC&category=2&&numberposts=1');
    foreach ($posts as $post) :
    ?>

    <li><h2>
    <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
    <br>
    </h2>

    <ul>
    <?php the_content(__('(more...)')); ?>
    </ul>

    <?php endforeach; ?>

    The post title shows up, but the content does not. Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trouble displaying post content from get_posts query’ is closed to new replies.