Archives by Category (UGLY HACK)
I needed the get_archives() function to be able to return posts from only a specific category. I hacked the file template-functions-general.php in the wp-includes directory to be able to do this. This only works if you want your archives to be listed postbypost.
All i did was change the function get_archives() to add a $cat argument (around line 178), and the query that returns the archive results (around line 264). It should be somewhat simple to change the other queries also so that it works with all archive methods.
Go to http://phoat.com/downloads/template-functions-general.phps to get it.
NOTE: This is for WordPress 1.3 alpha (recent nightly). I suppose the hack would be similar for 1.2 also.
- The topic ‘Archives by Category (UGLY HACK)’ is closed to new replies.