archivespress-dates

This shortcode will display an index for dates.

Attributes

Shortcode has several attributes:

  • layout: name of the layout to use. Currently available: ‘basic’ and ‘compact’. Default: ‘basic’.
  • post_type: name of the post type to use. Default: ‘post’.
  • order: order direction for years/months/days. Supports: ‘asc’ and ‘desc’. Default: ‘asc’
  • years: comma-separated list of years to take into account. Default: ”.
  • year: control if the year will be displayed or hidden. Allowed values: ‘show’, ‘hide’. Default: ‘show’.
  • class: additional CSS class names to add to the rendered block. Default: ”.
  • var-font-size: font size to set for the block. Default: ”.
  • var-line-height: line-height to set for the block. Default: ”.
  • var-year-background: background color for individual years. Default: ”.
  • var-year-color: text color for individual years. Default: ”.
  • var-month-background: background color for individual months. Default: ”.
  • var-month-color: text color for individual months. Default: ”.
  • var-day-background: background color for individual days. Default: ”.
  • var-day-color: text color for individual days. Default: ”.

Examples

Basic Layout

[[archivespress-dates]]

Compact Layout, the year 2021 only, year is hidden and changed colors

[[archivespress-dates years="2021" layout="compact" 
  year="hide" var-month-background="#aa0000" var-day-background="#9b51e0"]]

Compact Layout, for years 2020 and 2021, with changed colors

[[archivespress-dates years="2020,2021" layout="compact" 
  var-year-background="#fbd15c" var-year-color="#900" 
  var-month-background="#aa0000" var-day-background="#0693e3]]
0
0
333
Rate this reference

You are not allowed to rate this post.

Leave a Comment