customised loop and categories with 2.0
-
Hi,
I have just upgraded to WP2.0 *almost* seamlessly and am just trying to sort out a few glitches.
I was previously using categories and then customised loops to give a blog page with “notes” down the lefthand side and “articles” in the main content area. (where notes and articles are different category names).
The loops looked like this:
<?php query_posts('category_name=article&showposts=7'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?><!-- do stuff ... -->
<?php endwhile; endif; ?>
After the upgrade this format resulted in no posts being displayed.
I have changed the first line to
<?php query_posts('category=1&showposts=7'); ?>
(ie I am using the category id number rather than the name). This now displays the last 7 posts from *all* categories.
Do I need to change the way I am querying the posts?
I would like to get back to displaying only the posts within a particular category.
- The topic ‘customised loop and categories with 2.0’ is closed to new replies.