Single category loop conflicts
-
Hello.
I created a category (category 10) that lists free music downloads on mysite. I placed a loop in the sidebar to publish the free music posts:
<div id="extras"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Right Sidebar') ) : else : ?> <?php include (TEMPLATEPATH . '/searchform.php'); ?> <h2>Free Downloads</h2> <?php query_posts('cat=10&showposts=10'); ?> <?php while (have_posts()) : the_post(); ?> <div class="sidepost"> <span style="color:#286ea0"><strong><?php the_title(); ?></strong></span> <?php the_content('Read more »'); ?> </div> <?php endwhile; ?> <?php endif; ?> </div>
Which works fine. However, the loop in the main section of the page (code was default from Wooden Mannequin theme I installed) suddenly only published posts from category 10 (free music) just like the sidebar.
So I added code similar to that of the sidebar to the main index so that it would stream category 3 only. That worked.
However, now if you click on a category in the main section (even category 3) when you get to the category page, it only shows posts in category 10 (fre music) in the main part of the page. Even if the url is
it still shows category 10 (free music).
Any ideas how I caused this or how I can fix it so that category pages show the correct category?
Thanks!
T
- The topic ‘Single category loop conflicts’ is closed to new replies.