Just use Category Templates and then WordPress will automatically use the proper template when that Category is clicked say from a list presented by template tag, wp_list_categories().
Related:
Stepping Into Template Tags
Stepping Into Templates
Template Hierarchy
The catch is that I can’t use wp_list_categories().
Categories A, B, and C are supposed to look like separate sections of the site. There should be no bleed through, meaning the user cannot see anything remotely related to Category B while in Category A and vice versa.
Right now I am just calling for the standard monthly archives under my sidebar which shows all posts in all categories and that is not what I need.
So where are you presenting the link to get to Category A? or Category B, or Category C?
We have a header with links for each Category at the top but we want an archive in the sidebar for each category on it’s own category.php file.
I still believe my main point about Category Templates applies.
hi, i want to do the same as hearsaychris, but i find the category template idea confusing not to mention the actual help pages on it.
i don’t see why i can’t just make two sidebars A and B,
then put them both one underneath the other so it may look like :
–sidebarA–
pages
archive 1
–sidebarB–
meta
archive 2
and then for archive 1 I have :
<?php wp_get_archives(‘cat=5’); ?>
and for archive 2 I have :
<?php wp_get_archives(‘cat=1’); ?>
…….why is wordpress not this simple? seems like a logical and good starting point for me, but alas ..
You can do exactly what antistandard wants to do if you use this plug-in:
http://kwebble.com/blog/2007_08_15/archives_for_a_category
I agree, however, that wp_get_archives() really should have this functionality.
Thank you fisherwebdev. The plugin helped me sort the same issue.