Archive-Pro-Matic Decade Filters

As of Archive-Pro-Matic version 1.1.10 we have added two filters two filters for the decade archives list:

Filter: apm_decade_archive_list


apm_decade_archive_title is used to display how the decade appears in the archive list. The default list is YYYY’s, for example:
2010’s

2000’s

apply_filters('apm_decade_archive_list', $text, $decade);

This filter can be used to change how the decade list is displayed by adding the following to the function.php file in the child-theme.

add_filter( 'apm_decade_archive_list', 'list_decade_range', 10, 2 );
function list_decade_range($text, $decade){
   $text = $decade.' - '.($decade + 9);
   return $text;
}

Filter: apm_decade_archive_title

apm_decade_archive_title is used to display the title of the decade archive page. The default title is The YYYY’s for example:
The 2000’s

apply_filters('apm_decade_archive_title', $title, $decade);

And would be used by adding the following to the child theme’s function.php file:

add_filter( 'apm_decade_archive_title', 'decade_range_title', 10, 2 );
function decade_range_title($title, $decade){
   $title .= ' ('.$decade.' - '.($decade + 9).')';
   return $title;
}

Here is an example shortcode that will list an archive of posts by decade:

[archives type="decade"/]
this is a caption