How To Add A Header Template In Oxygen Builder

Jonathan Killian
May 30, 2022

Oxygen builders templates offer a powerful and simple way to create template files without having to manually code them in a custom theme. However, the way Oxygen builder templates work in WordPress can cause some confusion. The first template most websites will need is the Header and Footer template which the Oxygen team calls the "Main" template in their pre-built design sets like the Atomic Design set.

Here is a step-by-step guide on how to add a Header Template in Oxygen Builder:

  1. In WordPress go to Oxygen > Templates > Add New Template.
  2. Name the template "Main" following the best practices set forth by the Oxygen team.
  3. Leave the "Inherits" option at "None."
  4. Under "Where does this template apply," select the "Other" dropdown and then check the box next to "Catch All."
  5. Make sure the "Template Priority" is set to zero which should be the default.
  6. Click the "Edit with Oxygen" button to build your Header and Footer and be sure to add an "Inner Content" element in between them. Omitting the "Inner Content" element will prevent other templates from inheriting the Main template which is essential to implementing the template globally.
  7. When making new templates, like Default Post, Archives and Page templates, be sure to select "Main" under the "Inherit From Other Template" option for the templates that you wish to apply the header and footer to.
Oxygen Builder Header Template Main Configuration
Oxygen Builder "Main" template configuration for global Header and Footer.

The "Catch All" setting ensures that this template applies to all pages without another template specifically applied to them. This will apply the template to all pages. The priority should be set to zero so more specific templates can override it. Within the template you will need to add your header and footer of course. But the important thing to remember is that you need to add an Inner Content element in between the header and footer. This will enable your other templates to inherit the Main template and their content will slot into the Inner Content element space. The next templates you will probably want to make is you Default Page and Default Post templates which should both inherit the Main template.