Skip to main content

Archive

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

All Fields​

FieldArgumentsReturnsDescription
title—stringArchive title (may hold HTML)
description—stringArchive description
type—stringArchive type identifier

title can hold HTML, such as Category: <span>News</span>. type is '' outside archives.

Archive Types​

archive.type returns one of these identifiers depending on the URL being viewed:

TypeExample URL
category/category/news/
tag/tag/breaking/
taxonomy/genre/sci-fi/ (any custom taxonomy)
post_type/products/ (custom post type archive root)
author/author/john/
date/2026/, /2026/05/, /2026/05/08/
archiveAny other archive page (fallback)

Common Patterns​

Display archive header​

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

Conditional archive styling​

archive-{{ archive.type }}

Check archive type​

{{ archive.type == 'author' ? 'Posts by ' ~ author.name : archive.title }}