BionicDrew
Member
Posted 3 years ago #
I am looking at Archiving my press releases. However it does not seem to work at all. On the press-releases page itself, i can list the months/years that the press releases were released. But when you click through they are all listed regardless of when they were released. Below is the code i am using to list by months/years of release:
<?php wp_get_archives('cat=13'); ?>
Any help would be much appreciated.
The template tag, wp_get_archives(), does not allow you to 'filter' for a specific category.
See Category Archives for some ideas.
BionicDrew
Member
Posted 3 years ago #
Alas, category archives is blank. Any other ideas?
If your category archives are blank then something is wrong with the template that is being used. Template Hierarchy will help you find out what template is being used by your theme, then fix that. Or copying (COPY not MOVE) wp-content/themes/yourtheme/index.php to wp-content/themes/yourtheme/category.php is another quick solution.
BionicDrew
Member
Posted 3 years ago #
Sorry, i meant the link above led to a blank web page
I am sticking to my answer ;)
BionicDrew
Member
Posted 3 years ago #
Thanks! Nah, the archives themselves aren't blank. To see an example go to:
http://hitentertainment.bionic-comms.co.uk/newsboard/press-releases.
BionicDrew
Member
Posted 3 years ago #
Resolved now:
<?php wp_get_archives("type=weekly&limit=&cat=13"); ?>
stevepage
Member
Posted 3 years ago #
Michael he wasn't saying HIS category archives are blank, he was saying the link you posted to Category Archives THIS LINK is no longer a valid page at wordpress.org
Do you have the link to the correct page?
Does anyone know of a working way to show postbypost AND limit it to a category as I need this too?