Shortcode
Annual Archive can also be used in posts and pages simply by including the
shortcode. The following attributes can be defined to customize the way the archive is rendered:
Type Attribute
[[archives type="daily" /]]
- 8 December, 2021
- 26 February, 2019
- 4 October, 2018
- 8 February, 2018
- 29 November, 2017
- 17 March, 2015
- 8 January, 2015
[[archives type="weekly" /]]
- 6 December, 2021–12 December, 2021
- 25 February, 2019–3 March, 2019
- 1 October, 2018–7 October, 2018
- 5 February, 2018–11 February, 2018
- 27 November, 2017–3 December, 2017
- 16 March, 2015–22 March, 2015
- 5 January, 2015–11 January, 2015
[[archives type="monthly" /]]
[[archives type="yearly" /]]
[[archives type="decade" /]]
[[archives type="postbypost" /]]
- New Website: Pluginoven.com
- All Plugins 5.1 Compatible
- Unlimited Licences are Ending
- Annual Archive v1.5.1 & Archive-Pro-Matic v1.1.1
- T(-) Countdown v2.3.18
- Collapse-O-Matic v1.7.8
- Collapse-O-Matic v1.7.7
[[archives type="alpha" /]]
- A History of jQuery Versions Included in WordPress
- All Plugins 5.1 Compatible
- Annual Archive 1.3
- Annual Archive v1.5.1 & Archive-Pro-Matic v1.1.1
- Archive-Pro-Matic v0.1
- Archive-Pro-Matic v0.4
- Collapse-O-Matic 1.4.8
Limit Attribute
The limit attribute controls the number of results displayed.
[[archives type="monthly" limit="3" /]]
Order Attribute
The order attribute controls the sort order. The only valid values is DESC and ASC. Descending (DESC) is the default.
[[archives type="yearly" order="ASC" /]]
Alpha Order
By default alpha lists are displayed A->Z ascending. To reverse the order of alpha archive type the alpha_order attributes must be set to DESC.
Examples
[[archives type="alpha" limit="3"]]
[[archives type="alpha" alpha_order="DESC" limit="3"]]
Format Attribute
[[archives type="monthly" limit="7" format="option" /]]
Supported format value options are:
- html – In HTML list (
<li>
) tags and before and after strings. This is the default. - option – In select (
<select>
) or dropdown option (<option>
) tags. - link – Within link (
<link>
) tags. - custom – Custom list using the before and after strings.
Before Attribute
Text to place before the link when using ‘html’ or ‘custom’ format options. There is no default.
After Attribute
Text to place after the link when using ‘html’ or ‘custom’ format options. There is no default.
Select Text Attribute
[[archives type="monthly" limit="7" format="option" select_text="Choose Wisely" /]]
The select_text attribute is used to change the default text that shows up as the default selected value when using the option format.
Showcount Attribute (deprecated)
Depreciated. Use show_post_count.
Show_Post_Count Attribute
[[archives type="monthly" limit="7" show_post_count="true" /]]
- December 2021 (1)
- February 2019 (1)
- October 2018 (1)
- February 2018 (1)
- November 2017 (2)
- March 2015 (2)
- January 2015 (2)
Display number of posts in an archive (true) or do not (default). For use with all type values except ‘postbypost’. Replaces the depreciated showcount attribute to keep more inline with the wp_get_archives parameters.
Tag Attribute
[[archives type="monthly" limit="7" tag="OL" /]]
Defines the list type to use. Options are UL (default) and OL
Post_Type Attribute
Post Types are supported as of Annual Archive version 1.4.8. To list an archive of a specific custom post type, using the post_type attribute like so:
[[archives type="monthly" post_type="the_post_type_slug" /]]
Advanced Examples and Tests
Further examples and demonstrations are available on our test server under the Annual-Archive category.