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:
- In WordPress go to Oxygen > Templates > Add New Template.
- Name the template "Main" following the best practices set forth by the Oxygen team.
- Leave the "Inherits" option at "None."
- Under "Where does this template apply," select the "Other" dropdown and then check the box next to "Catch All."
- Make sure the "Template Priority" is set to zero which should be the default.
- 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.
- 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.
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.