Skip to main content
Documentation/Templating/Archive Templates
Templating

Archive Templates

An archive is a list of content rather than one item: a category, an author's posts, a
month, the blog index. An archive template designs that list once and every archive on
the site renders through it — each one filled with its own results.

The difference from a single template is what the page
has to work with. A single view has one post. An archive view has a query — a set of
results WordPress already ran to decide what belongs on this page — so you build with a
loop rather than a Template Content Area.

Creating an archive template

  1. In wp-admin, go to Oxygen → Templates and click Add Template.
  2. Oxygen shows a short warning about reading the documentation before creating custom
    templates — click Continue.
  3. Give it a Title, and set Location to an entry from the Archive group —
    All Archives covers every archive on the site, and the more specific locations are
    below.
  4. Optionally add Conditions, then click Add template.
The Add template dialog with Location set to All Archives

The template starts empty. Click its name in the list to open it in the builder.

Archive locations

The Archive group of the
Location dropdown:

Location Matches
All Archives Every archive view of any kind.
Post Archives The blog posts index.
Taxonomy Archive A category, a tag, or any custom taxonomy term.
Date Archive Year, month and day archives.
Author Archive One author's posts.
Post Type Archive The archive page of a custom post type.

Displaying content in an archive template

An archive template's job is to lay out a list: the blog index, a category's posts, one
author's articles, a custom post type's listing. Almost every archive template is built
the same way — a heading, and a Post Loop Builder that
renders the results.

A typical archive template on the canvas: a heading above a Post Loop Builder rendering a blog index as a grid of post cards

The archive's own query applies to the Post Loop Builder automatically. Drop the
element in and leave its query untouched — don't open the query builder, don't click Apply
Query — and it inherits the page's main WordPress query, which on an archive is exactly
that archive's results. That's the mechanism that lets one template serve every archive:
the same unmodified template renders the posts in a category on /category/tutorials/,
that author's posts on /author/jane/, and that year's posts on /2026/.

The moment you open the query builder and apply a query, the loop stops inheriting and
renders your query instead, on every archive. That's the right move for a "latest three
posts" strip inside a template, and the wrong move for the archive's main list.

Pagination comes from the same inherited query: WordPress has already decided how many
items belong on a page, and the loop's Pagination design section styles the controls.
The loop element in full — queries, layouts, the repeated block and pagination — is
covered in Loops and
Post Loops.

Design the loop item once — usually as a Component so it can
be reused — and the list fills itself everywhere.

A category archive on the front end, rendered by the template — the archive title above the filtered list of posts

Bind a Heading to the Archive Title field and it names itself correctly on every
archive — that's the other half of making one template serve them all. Binding controls to
the database is dynamic data; Archive Title, Archive
Description and every other field are listed in the
Fields Reference.

Designing the empty results case

An archive with no posts renders an empty list. To give it something better, target a
second template at the same Location and add the condition WP_Query Found Posts Count is
less than 1
— the "no results" condition. When the archive comes back empty that template
wins and renders your message instead.

That condition, and every other one you can target a template with, is catalogued in
Conditions Reference. The same condition works on
Search Templates.

An empty category on the front end, rendering the empty-state template's message instead of a blank list

Tips

One All Archives template, plus overrides where a list deserves its own design

That's the usual arrangement: one template covering everything, and a specific archive
location wherever one list needs to look different. You rarely touch the priority numbers
to make that work — each archive location carries a default that already puts the specific
one ahead of All Archives. The numbers are in
Location, Conditions & Priority.

An empty-state template needs no priority change

Give it the same Location as the normal template and the "no results" condition, and leave
both at the same priority: Oxygen breaks a priority tie in favour of the template that
has conditions. Setting the empty-state template higher does no harm and makes the intent
obvious, but it isn't required.