Multiple Loops
-
I am trying to set up my theme so that a category page will have all the posts in that category running down the left half of the page. On the right half, another list of the posts in that category, but only ones that are tagged ‘feature’.
I’ve tried following guides for multiple loops but they don’t appear to work properly. This is what I have now in sidebar.php:
<?php rewind_posts(); ?> <?php query_posts($query_string . '&tag=feature'); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php the_title(); ?> </a> <?php endwhile; ?>This does spit out the featured posts, but not from the category I’m viewing. You can see what’s happening here:
http://www.ihatetourists.com/category/albums/
“Hello world!” is in the ‘News’ category, but its showing up in the ‘Albums’ category page.
Any help greatly appreciated!
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
The topic ‘Multiple Loops’ is closed to new replies.