Skip to main content

Archive

Access archive page data. Available on category, tag, author, date, post type, and search archive pages.

All Fields

FieldArgumentsReturnsDescription
titlestringArchive title
descriptionstringArchive description
typestringArchive type identifier

Basic Fields

{{ archive.title }}
{{ archive.description }}
{{ archive.type }}

Archive Types

The type field returns an identifier for the current archive:

TypeDescription
categoryCategory archive
tagTag archive
authorAuthor archive
dateDate archive
post_typePost type archive
taxonomyCustom taxonomy archive
searchSearch results

Common Patterns

Display archive header

<h1>{{ archive.title }}</h1>
{{ archive.description }}

Conditional archive styling

archive-{{ archive.type }}

Check archive type

{{ archive.type == 'search' ? 'Search Results' : archive.title }}