Archives by category not working
-
Hi all,
I’ve been searching for ages and can’t solve this problem.
Here is the News category of my site:
https://www.thegoodagency.co.uk/the-news/If you click a monthly archive link on the lower right menu, like December, you get this page:
https://www.thegoodagency.co.uk/2008/12/The problem here is, it is showing all the-news archives, which is correct, but it’s showing all the months, not just December. The title is working fine, but it shows the content for all months.
In the archive.php template, I have specified that I only want show archives from ‘cat-1’ (IE – the-news category), as this is the only category I ever want to show archives for. I am doing this using query_posts just before the loop. So:
<?php query_posts('cat=1'); ?>
The archive template works fine if I don’t add this line of code. As in, it will show only posts for the month that is clicked. The problem is though if I don’t have this line of code, it will then show posts for all categories; not just the-news.
So, what I want to do is have a template that only shows archive posts for the current category and the current month. Is there a way I can create an archive template that is specific to a category, like “archive-1.php”? Any other suggestion would be a help though too.
Thanks
- The topic ‘Archives by category not working’ is closed to new replies.