I have two categories on a site – news which contains news posts and blog – which contains blog posts. Each page has a wp_get_archives in the sidebar. I’d like to limit the archive listing by category but after looking at the codex this does not seem possible. http://codex.wordpress.org/Function_Reference/wp_get_archives
<?php wp_get_archives('type=monthly&limit=12'); ?>
That code lists the archives for all the posts, but I want to list archives for just that category. Am I using the wrong function? Or is this not possible?
Basically this is possible, but somewhat messy. This function relies on direct SQL query to database, which you can change via
getarchives_where
andgetarchives_join
filters.I just installed this plugin and it seems to work fine.
http://wordpress.org/extend/plugins/wp-category-archive/installation/
I use this code on my site to pull from a specific category (this is in the sidebar – shows just my ‘blog’ posts and not my ‘portfolio’ posts):
i am not sure if this workaround will do :
if instead of the archive you use RSS and specify for the RSS the number of post titles to be shown.
it is easy to get the RSS of the category – easy to specify nbre of posts.
no ? would it work ?