Easily add custom post type and taxonomy archives to your theme
EZ_Post_Archives::get($args);
$args = array(
'post_type' => '',
// the slug(s) of the custom post type.
// must use an array if using multiple post types
'limit' => 12,
// sets the number of archives pulled in
'type' => 'yearly',
// either yearly or monthly
'taxonomy' => null,
// optional taxonomy
'term' => null,
// optional term
'month_format' => '<a href="{{link}}">{{month}} {{year}}</a>',
// format for monthly links
'year_format' => '<a href="{{link}}">{{year}}</a>',
// format for yearly links
'month_name_format' => 'M'
// see the PHP date() function for reference
);
EZ_Post_Archives::the_title();
archive-{post-slug}.php
archive.php
If you use the body_class() function, the plugin will add the following classes to your body tag:
If you need to check if you are on an archive page use the is_post_type_archive() conditional function
Requires: 3.2.1 or higher
Compatible up to: 3.3.2
Last Updated: 2012-5-2
Downloads: 239
Got something to say? Need help?