Stand with Ukraine. Fight for freedom and democracy

Donate
Back to contents

JetThemeCore: Templates’ Conditions Overview

Find out how to set needed conditions for the templates built with the help of the JetThemeCore plugin without any effort.

Theme Templates’ Conditions

With the JetThemeCore plugin, you can easily define the templates’ conditions by opening WordPress Dashboard > Crocoblock > Theme Templates.

NOTE!
Be aware conditions are not available for the Page and Single templates.

For example, let’s build a header by pushing the “Add New” button.

theme parts 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.

edit condition button

The newly displayed pop-up allows you to set the conditions by pushing the “Add condition” button.

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 and exclude condition
  • Include — allows including conditions for display;
  • Exclude — lets you exclude conditions.

The following drop-down defines the type of the source.

type of condition 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.

Entire

Once this value is selected, there is only one option in the third drop-down menu, “Entire Site.”

entire site condition

Singular

Define the source for the singular page in the following selector.

singular condition

Archive

Pick the source for the archive in the selector and specify the archive if required.

archieve condition

Advanced

With the “Advanced” option, you can set other conditions for a template, such as URL parameter, device, or WordPress roles.

However, also mind pasting the needed value in the final field. It will differ depending on the option you choose in the preceding selector.

advanced condition

WooCommerce

NOTE!
You can only use this condition if you have the installed and activated WooCommerce plugin.

With the “Woocommerce” option, you can set the source for the WooCommerce pages.

woocommerce condition

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.

adding several condition

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.

header with conditions

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.

NOTE
Conditions you set here override those you have activated before for separate elements.

Let’s build a new template by pressing the “Create new page template” button.

theme builder create new page template button

Straightaway, you can set the conditions in the appeared pop-up, just hit the “+ Add Condition” button.

theme builder 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.

theme builder conditions manager

Once the template is built, you can press the dots-shaped icon and “Edit conditions” button to open the conditions manager whenever you need.

page template edit conditions button

Now you know how you can set the desired conditions just in several clicks with the JetThemeCore plugin.