Archive-Pro-Matic Display Multiple Categories

As of version 1.1.2, multiple categories can be selected using the cat_id attribute. Simply provide a comma separated string of the category ID’s to include. Use a negative ID to omit multiple categories.

For example to include a yearly archive of posts with both the categories of ‘Archive-Pro-Matic’ (ID 55) and ‘collapse-pro-matic’ (ID 43) the shortcode would be:

[archives type="yearly" cat_id="55,43"]

Note: Currently the title of the archive page will display only the first category. A solution to display multiple titles is in the works. Multiple category titles will now display on the archive page.

Archive Pro Matic Highlight Class

Introducing a new attribute for Archive-Pro-Matic: highlight
Highlight accepts the following values:

  • current-year
  • active-year

Assigning ‘current-year’ as the value of the highlight attribute will add a current-year class to the current year in the archive list. Assigning ‘active-year’ would only be assigned to the archive list when placed on an archive page.

Demos

We have added a bit of css to highlight each of the classes:

.current-year {
border-left: 2px solid red;
}

.active-year {
border-left: 2px solid blue;
}

current-year

Assigning ‘current-year’ as the value of the highlight attribute will add a current-year class to the current year in the list:
[archives type="yearly" cat_id="4" limit="5" highlight="current-year"/]

active-year

Assigning ‘active-year’ would only be used on the archive page itself. To see this in action, first visit the an archive page, say 2014 and on that page place an archive list using the sidebar widget or following shortcode.

[archives type="yearly" cat_id="4" limit="5" highlight="active-year"/]

Annual Archive / Archive-Pro-Matic Shortcode Test


Notice: Trying to get property 'publicly_queryable' of non-object in /var/www/vhosts/spacedonkey.de/httpdocs/wp-includes/post.php on line 1816

Notice: Trying to get property '_builtin' of non-object in /var/www/vhosts/spacedonkey.de/httpdocs/wp-includes/post.php on line 1816

Here are a few tests of the archive pro matic shortcode:
[archives type="daily" limit="5"]

[archives type="weekly" limit="5"]

[archives type="monthly" limit="5"]

[archives type="yearly" limit="5"]

Archive-Pro-Matic

The post_type and cat_id attributes are available by upgrading to Archive-Pro-Matic.
[archives type="yearly" post_type="monkey" limit="5"]

[archives type="yearly" post_type="donkey" limit="5"]

[archives type="monthly" post_type="donkey" limit="5"]

[archives type="monthly" post_type="monkey" limit="5"]

[archives type="weekly" post_type="monkey" limit="5"]

[archives type="daily" post_type="monkey" limit="5"]

[archives type="yearly" cat_id="4" limit="5"]

[archives type="alpha" cat_id=4 limit="5"]

order

By default alpha and postbypost lists are always displayed A-Z descending. To change the order of alpha or postbypost, the alpha_order or post_order attributes must be used.

Alpha type archives have a default order of ASC:
[archives type="alpha" limit="5"]

To change this set the alpha_order attribute to DESC:
[archives type="alpha" alpha_order="DESC" limit="5"]

Post-by-post archive types have a default order of DESC (new descending to old posts):
[archives type="postbypost" limit="5"]

To change this set the post_order attribute to ASC (old ascending to new posts):
[archives type="postbypost" post_order="ASC" limit="5"]

New as of version 1.0

[arcpromat type="alpha" cat_id="4" limit="5"/]

New as of version 1.0.4

[archives type="alpha" cat_id="4" limit="10" alpha_headings="true"/]

Styling with CSS

To style the css you can wrap the shortcode in a div with a specific class or id like so:

<div class="my_archive">
    [archives type="weekly" post_type="monkey" limit="5"/]
</div>

And then define the UL and LI CSS like so:

.my_archive UL {
    list-style-type: circle;
}

The result:

Here is a post by post:

here is an alpha

and in reverse:

Here is a CPT (monkey) and Taxonomy (location) and term (Europe):
[archives type="yearly" post_type="monkey" taxonomy="location" term="Europe"/]

Post by post:
[archives type="postbypost" post_type="monkey" taxonomy="location" term="Europe"/]