Skip to main content
Documentation/Templating/404 Templates
Templating

404 Templates

A 404 template designs the page a visitor gets when the URL they asked for doesn't exist.
It's the simplest template type in Oxygen: one Location, no conditions to write, and
nothing to narrow — a single template covers every missing URL on the site.

Create a 404 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 — "404" is as good a name as any — and set Location to
    404 – Not Found Error, in the Other group of the dropdown. There is nothing to
    narrow, so leave Conditions empty.
  4. Click Add template.
The Add template dialog with the title set to 404 and Location set to 404 - Not Found Error

The template starts empty. Click its name in the list to open it in the builder and build
the layout — a heading, a line of explanation, a link home, and usually a Search Form
so a visitor who mistyped a URL can find the real page. Its results land on whatever
search template you have.

Check it by visiting a URL that doesn't exist on your site.

The finished 404 page on the front end, with the site's own header and footer around it

One thing to know while you build: a 404 template can't be previewed against real content,
because there is no such thing as a specific 404 to preview. The canvas shows the
template's own elements and nothing more — which is also exactly what the front end
renders.

A 404 template open in the builder, the canvas showing only the template's own elements with no preview content behind them