Skip to main content
Documentation/Templating/Overview
Templating

Overview

Templates are used to apply the same design to multiple pages. Think sitewide headers and footers, a layout for all blog posts or listings, etc. In conjunction with with dynamic data.

Template types

Templating lives in three admin screens — Oxygen → Templates, Headers and
Footers — and a template's Location decides which
kind it is.

Type What it lays out Article
Single One piece of content at a time — a post, a page, a product — with the parts that vary bound to dynamic data. Single Templates
Archive A list of content: a category, an author's posts, the blog index. A loop inside inherits each archive's own results. Archive Templates
Search The results page a visitor lands on after searching. Search Templates
404 The page a visitor gets when the URL doesn't exist. 404 Templates
Header & Footer What renders above and below whatever the page shows, resolved separately from the content template. Headers & Footers

Managing templates

Templates live at Oxygen → Templates in wp-admin; headers and footers have their own
screens at Oxygen → Headers and Oxygen → Footers. Each screen is the same list.

The Templates list
The Templates list

The list shows every template with its Applies to location, a

icon in the Conditions column when it has conditions (hover it to read them), its
Priority, and an Active toggle.

  • Active — switch a template off to stop it applying anywhere without deleting it.
    The change takes effect immediately.
  • Hover a row for its actions: Edit in Oxygen opens the builder, Settings
    reopens the title/location/conditions/priority dialog, Duplicate copies the
    template with its settings, and Trash removes it.
  • Trashed templates live under the Trash button, where you can Restore them,
    Delete permanently, or Empty Trash.
  • The search box filters the list by title.

The Headers and Footers screens are the same list, with the same row actions,
trash and search.

Create a template

  1. Go to Oxygen → Templates and click Add Template.
  2. Give the template a Title and choose a Location.
  3. Optionally add Conditions
    and adjust the Priority, then click Add template.
The Add template dialog, filled in

Building the template layout

Click a template's name (or hover it and click Edit in Oxygen) to open it in the
builder. Two extra controls appear in the toolbar:

  • Template: shows which template you're editing.
  • Preview post: picks which real piece of matching content fills the canvas while
    you design. Click it to search and switch between everything the template can apply
    to — the canvas updates immediately. This only changes what you preview; it doesn't
    change what the template applies to.
The Preview post picker open in the builder toolbar
The Preview post picker open in the builder toolbar

How Oxygen decides what renders

For every request Oxygen picks one header, one template and one footer, independently: in
each contest, every active entry whose Location matches and whose Conditions pass is a
candidate, and the highest Priority wins. The defaults already encode "specific beats
general", so you rarely touch the numbers — see
Location, Conditions & Priority.