Theme Templates’ Conditions
With the JetThemeCore plugin, you can easily define the templates’ conditions by opening WordPress Dashboard > Crocoblock > Theme Templates.
For example, let’s build a header by pushing the “Add New” button.
After the pop-up appears, set the needed Template Type, define whether you want to work with WordPress Block Editor or Elementor page builder in the Template Content Type, and fill in the Template Name field.
Complete the single page with content and press the “Publish” button. If you return to WordPress Dashboard > Crocoblock > Theme Templates, you will see the “Conditions not selected” next to the built item in the Instances tab.
Press the “Edit Conditions” button located right below.
The newly displayed pop-up allows you to set the conditions by pushing the “Add condition” button.
Once clicked, you can specify the condition with the help of several drop-down menus.
The first selector allows you to pick between two options.
- Include — allows including conditions for display;
- Exclude — lets you exclude conditions.
The following drop-down defines the type of the source.
You can set different conditions:
- Entire — for the whole site;
- Singular — for available singular pages;
- Archive — for provided archive options;
- Advanced — for URL parameter, device, and roles;
- Woocommerce — for WooCommerce products archive, single product, and pages.
Once this value is selected, there is only one option in the third drop-down menu, “Entire Site.”
Define the source for the singular page in the following selector.
Pick the source for the archive in the selector and specify the archive if required.
However, also mind pasting the needed value in the final field. It will differ depending on the option you choose in the preceding selector.
With the “Woocommerce” option, you can set the source for the WooCommerce pages.
Pay attention that you can set several conditions by hitting the “Add condition” button above the first condition.
For instance, we include the header for the entire website and exclude it for the singular page where the other header is already attached.
Mind that you can delete conditions by pressing the trash icon.
After setting the desired conditions, click on the “Save Conditions” button and close the pop-up by pressing the cross-shaped button.
In the Instances tab of the Theme Parts page, you can see the newly set active conditions. Those marked with the “+” sign are included conditions, and “-” displays the excluded conditions.
Don’t forget that you can alter them at any time by pressing the “Edit Conditions” button.
Theme Builder Conditions
However, if you plan to create global page templates by proceeding to WordPress Dashboard > Crocoblock > Theme Builder, there are also some conditions to set.
Let’s build a new template by pressing the “Create new page template” button.
Straightaway, you can set the conditions in the appeared pop-up, just hit the “+ Add Condition” button.
Here you can see the same settings as earlier in this overview, so set them up according to your wishes.
Or push the “Create” button without making changes; you can set conditions after building a template.
Once the template is built, you can press the dots-shaped icon and “Edit conditions” button to open the conditions manager whenever you need.
Now you know how you can set the desired conditions just in several clicks with the JetThemeCore plugin.