• Resolved peanutterbutter

    (@peanutterbutter)


    Pretty sure I’m missing something obvious, but I have a basic loop that calls the last post, then pulls the title, thumbnail, and content. It works fine with the default Recent Posts widget in the sidebar, but when I remove it, the content is empty (but thumb and title still show up fine).

    <div id="latest-post">
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : query_posts('p=1'); ?>
    <h1><?php  the_title(); ?></h1>
    <?php echo get_the_post_thumbnail(); ?>
    <?php the_content('Read on »') ?>
    <?php endwhile; ?>
    <?php endif; ?>
    </div><!-- #latest-post -->

    It’s not a huge deal, I can live with the recent posts widgets, but I’m just wondering what I’m missing, and I couldn’t find anything on it.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Loop posts only show with Recent Posts widget’ is closed to new replies.