• So this whole “The Loop” thing just isn’t making sense to me here. I’m wanted to ad the title, post categories, and number of comments to a “Recent articles” section on my blog. This little spot of “recent articles” is on the same page as other posts. It’s actually in the sidebar.php file but whenever I add:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class=”post”>
    <h2 id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
    <p class=”postmetadata”>Posted in <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’,”,’|‘); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?>
    </div>
    <?php endwhile; ?>
    <?php endif; ?>

    to the sidebar.php file it just shows nothing. No errors or anything like that…just nothing.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Recent posts? I’m baffled…’ is closed to new replies.