danscratch
Member
Posted 2 months ago #
I have 2 categories - News and Blog - each is a separate section, from which the other should not be accessible other than through the main navigation.
I want to create an archive page for each category, which only shows posts from that category. This is no problem.
But what if I want to have an archive index page for each category, which shows the year links, and then when you click on a year, it shows the archive only for that year and that category. Is this possible?
Thanks
Dan
danscratch
Member
Posted 2 months ago #
Thanks esmi, but unless I'm missing something, that doesn't explain how to keep the categories separate, i.e. once I click on a year, it will show the archive for that year and ALL categories, whereas I want to show only one category.
You could try using something like query_posts($query_string . '&category_name=Foobar'); in the template to limit the list to just one category.
http://codex.wordpress.org/Template_Tags/query_posts