Support » Fixing WordPress » Messing with the_Loop

  • Rightyo.
    I decided yesterday that I was going to get rid of my ‘asides’ plugin (that has served me well, I must add) and code my own solution. Using the codex, and this post by Phu Ly I set about coding. And I failed.

    The basic loop:
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>

    To this, I added:
    <?php query_posts('category_name=asides'); ?>

    <?php if (have_posts()) :
    while (have_posts()) : the_post(); ?>
    <?php the_title(); ?>
    <?php endwhile;?>
    <?php endif;?>
    That worked, but I didn’t really want those posts at the bottom of each page. So I simply cut and pasted that code to the top. It didn’t work, and I think I know why, but I don’t know how to do it. In fact, I can’t even describe what I think I need to do, heh!
    I’m going to keep messing around with this, and use an implementation of Matt’s Asides until I’ve figured it out, but any assistance would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Messing with the_Loop’ is closed to new replies.