Archive-Pro-Matic Birthday and Birthmonth types

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

Birth Month

[archives type="birthmonth" order="ASC" /]

Birthday

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

Archive-Pro-Matic Advanced Category Archives

Building on the new block-style archive described in the last post, we now try with categories:

All Categories:

[archives type="monthly" taxonomy="category" sub_options="block" tag="div" sub_ul_class="my_slim_ul" li_class="block_archive_item" limit="10"/]

Single Category

[archives type="monthly" taxonomy="category" term="archive-pro-matic" sub_options="block" tag="div" sub_ul_class="my_slim_ul" li_class="block_archive_item" limit="10"/]

or use the cat attribute:

[archives type="monthly" cat="special1-posts" sub_options="block" tag="div" sub_ul_class="my_slim_ul" li_class="block_archive_item" limit="10"/]

or use the category attribute (alias for cat):

[archives type="monthly" category="special1-posts" sub_options="block" tag="div" sub_ul_class="my_slim_ul" li_class="block_archive_item" limit="10"/]

Multiple Categories

For an archive of multiple categories, the cat_id attribute must be used:

[archives type="monthly" cat_id="55,43" sub_options="block" tag="div" sub_ul_class="my_slim_ul" li_class="block_archive_item" limit="10"/]

Archive-Pro-Matic – Advanced Monthly Sub Archives

This is a test to create a category archive in the following format:

  • 2020
  • January
  • February
  • Mar
  • April
  • May
  • June
  • July
  • August
  • September
  • October
  • November
  • December
  • 2018
  • Jan
  • February
  • March
  • April
  • May
  • June
  • Jul
  • Aug
  • September
  • October
  • November
  • December
  • 2013
  • Jan
  • February
  • March
  • Apr
  • May
  • June
  • July
  • August
  • September
  • October
  • Nov
  • December
  • 2012
  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August
  • Sep
  • October
  • November
  • Dec


Step one: allow the sub_options attribute to work with standard monthly archives.

[archives type="monthly" sub_options="true" limit="10" /]

Step two: add new feature to allow sub_options to be sorted ASC (1 – 12) or DESC (default: 12 – 1). New attribute: sub_order

[archives type="monthly" sub_options="true" sub_order="ASC" limit="10" /]


Step three: add the ability show empty months as placeholders. New attribute: show_empty

[archives type="monthly" sub_options="true" show_empty="true" limit="10" /]

Step four: allow month date to be formatted: January becomes Jan. New attribute: month_format just use the date_format attribute

[archives type="monthly" sub_options="true" date_format="M" sub_order="ASC" show_empty="true" limit="10" /]

Step five: test that this works with category filters. Here we use cat_id to only show archives for category id 55:

[archives type="monthly" cat_id="55" sub_options="true" sub_order="ASC" show_empty="true" limit="10" date_format="M"/]
  • 2020
    • January
    • February
    • March
    • Apr
    • May
    • June
    • Jul
    • August
    • September
    • October
    • November
    • December
  • 2019
    • January
    • February
    • March
    • April
    • May
    • June
    • July
    • Aug
    • September
    • October
    • November
    • Dec
  • 2018
    • January
    • Feb
    • March
    • April
    • May
    • June
    • July
    • August
    • September
    • October
    • November
    • December
  • 2017
    • Jan
    • Feb
    • March
    • April
    • May
    • June
    • July
    • August
    • September
    • October
    • November
    • December
  • 2014
    • January
    • February
    • March
    • April
    • May
    • Jun
    • July
    • August
    • September
    • October
    • November
    • December

A single category archive can be shown using the category slug with the cat attribute:

[archives type="monthly" cat="collapse-pro-matic" sub_options="true" sub_order="ASC" show_empty="true" date_format="m" limit="10" /]
  • 2020
    • January
    • February
    • 03
    • April
    • 05
    • June
    • July
    • August
    • September
    • October
    • November
    • December
  • 2018
    • 01
    • February
    • March
    • April
    • May
    • June
    • 07
    • 08
    • September
    • October
    • November
    • December
  • 2017
    • January
    • February
    • March
    • April
    • May
    • 06
    • July
    • August
    • 09
    • 10
    • November
    • 12
  • 2016
    • 01
    • February
    • March
    • April
    • May
    • June
    • July
    • August
    • September
    • October
    • November
    • December

Step six: adjust format so year and months are displayed in a single line. The following attributes have been added to add classnames to the archive elements for styling:

  • class – classname for the archive element
  • li_class – classname for a LI element
  • sub_ul_class – classname for a sub ul element
  • sub_li_class – classname for a sub LI element
  • empty_class – classname for an empty LI element

To test this we first need to define some simple classes:

.my_clean_achive {
   border: 1px dotted black;
}
.my_sub_achive {
   border: 1px dotted red;
}
.red a {
   color: red;
   font-weight: bold;
}
.green a {
   color: green;
}
.grey {
   color: #999999;
}

Now we just need to assign the classes to the archive elements:

[archives type="monthly" cat="collapse-pro-matic" sub_options="true" sub_order="ASC" show_empty="true" date_format="M" limit="10" class="my_clean_achive" sub_ul_class="my_sub_achive" li_class="red" sub_li_class="green" empty_class="grey"/]
  • 2020
    • January
    • February
    • Mar
    • April
    • May
    • June
    • July
    • August
    • September
    • October
    • November
    • December
  • 2018
    • Jan
    • February
    • March
    • April
    • May
    • June
    • Jul
    • Aug
    • September
    • October
    • November
    • December
  • 2017
  • 2016
    • Jan
    • February
    • March
    • April
    • May
    • June
    • July
    • August
    • September
    • October
    • November
    • December

Now that we can control the CSS of every element we can finally create a block style archive using the following css:

.block_archive_item {
    display:inline;
    margin-left: 5px;
    white-space: nowrap;
}
.block_archive_item a {
   color: red;
}

[archives type="monthly" cat="collapse-pro-matic" sub_options="true" sub_order="ASC" show_empty="true" month_format="M" limit="10" li_class="block_archive_item" empty_class="grey"/]

Nearly there:

  • 2020
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • 2018
  • 2017
  • 2016
    • Jan
    • Feb
    • Mar
    • Apr
    • May
    • Jun
    • Jul
    • Aug
    • Sep
    • Oct
    • Nov
    • Dec
  • Now if we do not want the sub_options (months in this case) to be in a separate element (ul) we need a way let the system know: new accepted value ‘block’ for the sub_options attribute: sub_options=”block”.

    [archives type="monthly" sub_options="block" limit="10" /]

    We also no longer need to wrap the entire archive in a UL element, so we use tag=”div”. Finally we need to assign a sub_ul_class to slim down the sub_ul elements:

    .my_slim_ul {
       margin: 0;
    }
    
    [archives type="monthly" cat="collapse-pro-matic" sub_options="block" sub_order="ASC" show_empty="true" date_format="M" limit="10" 
    tag="div" sub_ul_class="my_slim_ul" li_class="block_archive_item" empty_class="grey"/]

    The final result:

    • 2020
    • January
    • February
    • Mar
    • April
    • May
    • June
    • July
    • August
    • September
    • October
    • November
    • December
    • 2018
    • Jan
    • February
    • March
    • April
    • May
    • June
    • Jul
    • Aug
    • September
    • October
    • November
    • December
    • 2013
    • Jan
    • February
    • March
    • Apr
    • May
    • June
    • July
    • August
    • September
    • October
    • Nov
    • December
    • 2012
    • January
    • February
    • March
    • April
    • May
    • June
    • July
    • August
    • Sep
    • October
    • November
    • Dec

    Done!

    Archive-Pro-Matic – Quarterly and Seasonal Archives

    Archive-Pro-Matic has two new archive types (Quarterly and Seasonally) and a couple new advanced shortcode attributes to manage seperators (sep) and sub options as described below:

    Quarterly Archives

    Example of the new quarterly archive type:

    [archives type="quarterly" limit="10" /]

    Seasonal Archives

    Seasonal archives are a bit more complex. First the plugin is currently limited to only four (4) seasons per year. The season names and starting dates can be defined in the plugin options as shown in the following screanshot:

    Season names and dates are easily defined. Only the month and day is used, the year is ignored.

    Simple example of seasonal archives:

    [archives type="seasonally" limit="10" /]

    New Attribute: sub_options

    Setting sub_options to ‘true’ for quarterly or seasonally archive types will present the year with the quarterly or seasonal archives below like so:

    [archives type="seasonally" sub_options="true" limit="10" /]

    Of course this also works in a drop-down select element:

    [archives type="seasonally" format="option" sub_options="true" limit="10" /]

    However, when setting format=”option” the sub_options could use a little separation. Therefore we have created a new sep attribute:

    New Attribute: sep

    Same example as above, this time with some fancy sub_option separation, and highlight current season if on archive page:

    [archives type="seasonally" format="option" sub_options="true" sep="— " highlight="active-season" limit="20" /]

    Archive-Pro-Matic Category Test

    This is a test for displaying archive-pro-matic category archives.

    Single Category

    [archives type="monthly" cat="collapse-pro-matic" /]

    But what about taxonomies, post tags for example? We can get a monthly archive for a specific post tag like so:

    [archives type="monthly" term="manhole" taxonomy="post_tag" /]

    Or all post tags by month. The following will list only posts that have at least one post tag assigned, grouped by month:

    [archives type="monthly" taxonomy="post_tag" /]

    And as a drop-down list:

    [archives type="monthly" taxonomy="post_tag" sep=" > " format="option" /]

    Special request: Years and each year’s tags as a subsets in a select drop-down:

    [archives type="yearly" taxonomy="post_tag" sep="—" format="option" sub_options="true"/]

    New “Quarterly” type:

    [archives type="quarterly" /]
    [archives type="quarterly" format="option" sep=" - " sub_options="true" /]

    Nes Archive Type “Seasonally”:

    [archives type="seasonally" /]
    [archives type="seasonally" format="option" sep=" - " sub_options="true" /]

    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"/]
    [archives type="monthly" cat_id="55,43" limit="10" /]

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

    Annual Archive / Archive-Pro-Matic Shortcode Test

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

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

    [archives type="decade"]

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