Post Archive Index

Every record as a date and a title, optionally grouped by year and month: the "everything we have published" index. It is shown in the block inserter as Post Archive Index and registered as canvas-core/post-archive-index.

Select the block on a page and its own settings open in the sidebar, in the panels below:

The Post Archive Index settings in the block editor sidebar

Settings

Each setting is named exactly as the block editor names it, followed by what it does and what it starts as. Where a setting carries a Shown when line, it stays hidden until that condition is met, which is the usual reason a setting looks missing from the sidebar:

Layout

  • GroupingDefaultOne flat list

    Grouping follows the records the query returns, so a year archive shows the one year it was asked for.

    ChoicesOne flat listBy monthBy yearthen month

  • Date FormatDefaultd M Y

    PHP date format for each row. A grouped index normally drops the year because the group already names it.

  • List ClassesDefaultarchive-list mb-0

    Classes on the list of dated rows, which set its spacing and how the rows are marked.

  • Year Block ClassesDefaultarchive-year

    Classes on the whole block for one year, which is where a rule or extra room between years belongs.

    Shown when Grouping is "By year, then month"

  • Year Anchor PrefixDefaultyear-

    Each year block gets this plus the year as its HTML id, so a "jump to year" rail can reach it.

    Shown when Grouping is "By year, then month"

  • Year Row ClassesDefaultrow g-4

    Classes on the row that sets the year label beside its list of records, and the gap between the two columns.

    Shown when Grouping is "By year, then month"

  • Year Label Column ClassesDefaultcol-md-3

    Classes on the column holding the year, which decide how wide that column is.

    Shown when Grouping is "By year, then month"

  • Year Label ClassesDefaultarchive-year-label

    Classes on the year itself, which set how large and heavy it reads.

    Shown when Grouping is "By year, then month"

  • Show Records Per YearDefaultOn

    Prints how many records each year holds under its year label.

    Shown when Grouping is "By year, then month"

  • Year Count ClassesDefaulttaxonomy-count mt-2

    Classes on that count, usually a muted colour so it sits behind the year.

    Shown when Show Records Per Year is on

  • Year Count SuffixDefaultarticles

    Word printed after that number, so it reads as "24 articles" rather than a bare figure.

    Shown when Show Records Per Year is on

  • Year Body Column ClassesDefaultcol-md-9

    Classes on the column holding that year list of records, which decide how wide it is.

    Shown when Grouping is "By year, then month"

  • Month Heading ClassesDefaultissue-kicker

    Classes on the small heading that opens each month.

    Shown when Grouping is "By month" or "By year, then month"

  • Month Heading FormatDefaultF

    How each month heading is written. The default gives the month name in full; add the year when the index is not already grouped by one.

    Shown when Grouping is "By month" or "By year, then month"

  • Between-Month List ClassesDefaultarchive-list mb-4

    Classes on every month list except the last one in its year, which uses the List Classes above.

    Shown when Grouping is "By month" or "By year, then month"

Query

  • Inherit Main QueryDefaultOn

    On: index the records this archive holds. Off: run an independent query using the fields below.

  • Page Size It FollowsDefault0

    When a card grid above this index paginates the same archive, this is the page size it uses, so page two of the grid is followed by page two of the index. 0 indexes the archive from the start.

    Shown when Inherit Main Query is on

  • Records ListedDefault0

    How many of the archive's records to index. 0 lists every one of them, which is what an index is for: the Reading setting's page size belongs to a grid of cards, not to a dateline.

    Shown when Inherit Main Query is on

  • Skip Leading RecordsDefault0

    Leaves this many of the newest records to a card grid above the index.

    Shown when Inherit Main Query is on

  • RecordsDefault30

    How many records this index lists when it runs its own query.

    Shown when Inherit Main Query is off

  • Category SlugsDefaultEmpty

    Limits the index to these categories, written as slugs and separated by commas. Leave empty to list every category.

    Shown when Inherit Main Query is off

Every Canvas block also carries the Animation, Scroll Effects and Advanced panels, which are described in Controls every Canvas block has.

Other blocks in Posts: Blog Archive Loop, Blog Loop, Blog Single Post, Post Author, Post Comments, Post Content.

Was this page helpful?