Creating yearly archive list (in sidebar) for custom post types
I have a theme I’m working with at the moment. I have three types of content (other than pages) which make up the content of the site.
Events (custom post type)
Sidebar for news and articles are displaying correctly as per the link below. Quite simply, I want to present a year archive in the sidebar for the ‘Events’ in the format below.
I’m currently generating this using the following code, however as you can see from the image it is pulling back all years (there are currently only events listed in 2011 and 2012) and all post types.
Here is the call to declare the custom post type in functions.php
NB: I’ve tried setting the
post_type=Eventas well with the same results.
Any and all help greatly appreciated before I go bald from pulling my hair out.
- The topic ‘Creating yearly archive list (in sidebar) for custom post types’ is closed to new replies.