I have archive links in my theme that get the archives for a specfic category (‘blog) like so:
<?php wp_get_archives('cat=6'); ?>
When i click on the link for the archives is just loads the category page again for the blog.
The url does change to:
http://localhost:8888/2012/11/?cat=6
But nothing changes on the page.
OK. Here is your problem.
You are use
wp_get_archives
incorrectly. That function accepts particular ‘keys’, andcat
isn’t one of them. You can use an array as above or the weird get-like string that is common in WordPress. You can’t pass it values it isn’t meant to handle though.What you are seeing is the function fall back to its ‘monthly’ archive default, and apparently append your string to the end, which I wouldn’t have expected.
Use get_category_link instead.