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"/]

Format: Option

Of course this also needs to work with drop downs.

[archives type="yearly" format="option" highlight="active-year"/]