Twice re-ordering categories
-
Sorry if this is easy for some, but I’m a bit lost. I have a sidebar with the following near the top to pull recent posts from a single category:
<?php $my_catposts = new WP_Query('cat=5&showposts=8'); ?>
<?php while($my_catposts->have_posts()) : $my_catposts->the_post(); ?>- ">
<?php the_title(); ?>
<?php endwhile; ?>
Then, further down the same sidebar, I want to put a list of categories, but the above code simple stops anything but Category 5. How do I reset the query to allow a list of categories further down? I tried the following, but not luck:
<?php rewind_posts(); ?>
<?php wp_list_cats('sort_column=name&optioncount=1&exclude=1,2,3,4,5,6'); ?>
- ">
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Twice re-ordering categories’ is closed to new replies.