Testing the new link_atts attribute in archive-pro-matic
[archives type="birthmonth" order="ASC" class="grid" link_atts="target='_blank'"/]
[archives type="yearly" cat_id="1" show_post_count="true" /]
A Pluginoven Test Site
Testing the new link_atts attribute in archive-pro-matic
[archives type="birthmonth" order="ASC" class="grid" link_atts="target='_blank'"/]
[archives type="yearly" cat_id="1" show_post_count="true" /]
In this example, the option to include a specific element is provide by using a checkbox. This feature was introduced in Print-Pro-Matic version 2.0-beta-210121
The default print target will be the article element. The image of the donkey has been assigned a class of ‘logo’. Now we need to create our print trigger and a checkbox:
[print-me title="Print Trigger"/]
<label><input type="checkbox" id="ppm_odnp" value=".logo">Donkey Free Print</label>
The checkbox must have an ID of ppm_odnp (because print-pro-matic optional do not print is a bit long). The value is the optional do not print selector, so .logo is for items with a class of ‘logo’, while #logo is an item with an id of ‘logo’.
Here is a working demonstration.
First the CSS:
ul.grid_flow {
list-style: none;
}
ul.grid_flow li {
display: inline-block;
}
ul.grid_flow li:not(:first-child):before {
content: '|';
}
Next the Shortcode:
[archives type="yearly" order="ASC" class="grid_flow"/]
And here are the results:
[archives type="birthmonth" order="ASC" /]
However, this (or any) unordered list can be formatted using css. Here is an example of how to turn the list in to a grid using the CSS columns attribute:
First, we define a UL class that we can later assign:
ul.grid {
list-style: none;
columns: 4;
}
Now we just need to assign this class to our list:
[archives type="birthmonth" order="ASC" class="grid" /]
As of Archive-Pro-Matic version 1.1.10 we have added two filters two filters for the decade archives 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;
}
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
Currently archives only accept one post type like so:
[archives post_type="monkey"/]
But what happens if we provide multiple, comma separated post types?
[archives post_type="monkey, donkey"/]
[archives post_type="monkey, donkey" show_post_count="true"/]
The trick to keeping the excerpt in line with the trigger text, is simply to use the excerpttag attribute to have the excerpt use a span tag like so:
[expand title="trigger text" tag="span" excerpt="excerpt" excerpttag="span"]target text[/expand]
trigger textexcerptthis is a test that will show nested collapse elements with a twist: only the first sub element will be shown. once it has been expanded, the next expand element will be displayed… and so on until the all elements visible.
This is a test of two new types of Archive-Pro-Matic archive lists:
Birthday: Show all posts published on the same day of the year
Birth Month: Show all post published on the same month, regardless of year
[archives type="birthmonth" order="ASC" /]
[archives type="birthday" order="ASC"/]
[archives type="birthday" order="ASC" sub_options="true" sub_order="ASC"/]
[archives type="birthday" order="ASC" sub_options="true" sub_order="ASC" show_empty="true"/]
[archives type="birthday" order="ASC" sub_options="block" sub_order="ASC" show_empty="true" tag="div" sub_ul_class="my_slim_ul" li_class="block_archive_item" empty_class="grey"/]
This is a test of nesting grouping. First, nested highlander grouping:
[expand title="This" rel="main-highlander"]
[expandsub1 title="This One" rel="this-highlander"]One[/expandsub1]
[expandsub1 title="This Two" rel="this-highlander"]Two[/expandsub1]
[expandsub1 title="This Three" rel="this-highlander"]Three[/expandsub1]
[/expand]
[expand title="That" rel="main-highlander"]
[expandsub1 title="That One" rel="that-highlander"]One[/expandsub1]
[expandsub1 title="That Two" rel="that-highlander"]Two[/expandsub1]
[expandsub1 title="that Three" rel="that-highlander"]Three[/expandsub1]
[/expand]