Find out how to set the condition for the header and apply it to different parts of the site to meet your requirements.
Before you start, check the tutorial requirements:
- Elementor (Free version) or WordPress Block Editor
- JetThemeCore installed and activated with WordPress header built
When using the default header, it is rarely possible to select multiple header templates or assign different headers to specific pages.
However, with JetThemeCore, you can create as many header templates as you want and then display them on various pages.
If you visit the WordPress Dashboard > Crocoblock > Theme Templates section, you will see an Info icon next to the Display Conditions column. When clicked, it will trigger a pop-up with recommendations on how to set theme template (header) conditions.
When editing a header template (or other theme parts like footer, single post, etc.), to control where and when this template appears on the site (for example, only on the homepage, or only for a specific post type), you need to set display conditions.
Conditions can be set through the Theme Templates section, but they work differently from those set in the Theme Builder section. JetThemeBuilder gives more control and works with any theme installed via Crocoblock. Click “Go to JetThemeBuilder” if you want more control over where your header (or other template) appears.
Setting the Header Template
To start setting the proper conditions for the header, go to WordPress Dashboard > Crocoblock > Theme Builder, find the page template (be it a Home page, CPT single/ archive, single post template, product archive, etc.) that you need to add a specific header to, and click the “+ Override theme header” button.
In the flyout window, select one of the available options, the “Create template” or “Add from library” option.
The “Create template” option will trigger the Create a template pop-up that contains two fields: Template content type and Template name.
- Template content type — in this field, you can select the type of builder you will use to create a header, either “Elementor” or “Blocks”;
- Template name — in this field, you can set the name of the template.
Click the “Create” button when done, and you will be redirected to the selected editor page.
Refer to this guide for instructions on creating a template.
The “Add from library” option will trigger the Template Library pop-up, where you can select a corresponding header.
In the Template Library pop-up, you can select the existing header template and assign it to the template you’re editing. Each template has two buttons, “Edit” (will redirect you to the editor page) and “Use” (will apply the template to the selected page).
Following the logic described in this manual, you can apply various header templates to different pages of your website.
That’s all one needs to know about setting different conditions for the WordPress website header using the JetThemeCore plugin on a WordPress website.