Hi,
I'm having a sudden problem with some custom loops, not sure what triggered it because it used to work fine before.
I have 4 loops:
1=header
1=sidebar
1=page
1=footer
The problem is that in one page template and categories all the custom loops will show ALL the posts even though I've chosen to show only from few categories.
Here's the code for Custom loop 1:
<?php if (have_posts()) : ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("cat=9,29,7,27,8,28&paged=$paged&posts_per_page=15&orderby=rand"); ?>
<?php while (have_posts()) : the_post(); ?>
<--- Here I have the content --->
<?php endwhile; ?>
<?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>
<?php endif;?>
^
This gives me 5 posts per page from ALL categories.
When I'm on a category page it will cause the same problem to all the rest of my loops (header,sidebar,footer)
What have I done wrong? Like I said, this used to work fine before but somehow I've managed to break it.
I'd appreciate any help :)