Help Center
Templates’ Conditions Overview

Templates’ Conditions Overview

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

With the JetThemeCore plugin, the templates’ conditions can be defined in the WordPress Dashboard > Crocoblock > Theme Builder directory.

The page templates can be observed in the “Tree view” and “Grid view”.

Tree View

The “Tree view” provides a structured, hierarchical representation of website page templates, making it easier to navigate.

jetthemecore page templates in tree view
Things to know

The “CPT Single,” “CPT Archive,” and “CPT Taxonomy” conditions are labeled as legacy. If page templates with such conditions are present on the website, one can hit the “Convert Now” button, and templates will be rearranged in the template hierarchy tree.

legacy template conditions

Clicking the “+” button near the required template name (e.g., “404 Page”) opens the Create page template pop-up with the automatically adjusted condition (“Include,” “Singular,” “404 Page” accordingly).

generated conditions in the tree view for page templates

After the page template creation by pressing the “Create” button, it will be shown in the “Grid View.”

created page tempate with the condition set

Grid View

A page template can be created by pushing the “Create new page template” button.

jetthemecore create new page template button

The conditions can be set in the Create page template pop-up by clicking the “+ Add Condition” button.

jetthemecore add condition button

Once clicked, the condition can be specified with several dropdown menus. 

The first selector allows choosing from two options:

include and exclude options
  • Include — allows including conditions for display;
  • Exclude — allows excluding conditions.

The following dropdown defines the type of the source:

source of conditions
  • Entire — for the whole site;
  • Singular — for available singular pages;
  • Archive — for provided archive options;
  • Advanced — for advanced conditions: “URL Parameter,” “Device,” “Roles,” “Mobile OS,” “Mobile Browsers,” and “WP Option”;
  • Woocommerce — for WooCommerce products archive, single product, and pages.

Entire

Once this value is selected, the third dropdown menu contains only one option: “Entire Site.”

Singular

The source for the singular page can be defined in the following selector. It includes individual posts, pages, or custom post types, pop-ups created with JetPopup, WooCommerce products, and forms created with JetFormBuilder.

singular source for page templates

Archive

The source for the archive can be specified in the third selector, which targets blog archives, category/tag pages, custom post types, pop-ups, products, or form archives.

archive conditions for page templates

Advanced

With the “Advanced” option, one can set such conditions for a template in the third dropdown:

advanced conditions for page templates
device conditions for page templates
roles conditions for page templates
  • Mobile OS — allows templates to be displayed based on the visitor’s operating system (Android OS, iOS, etc.);
mobile os conditions for page templates
  • Mobile Browsers — allows templates to be displayed based on the visitor’s mobile browser (e.g., Chrome, Dolphin, Opera, etc);
mobile browsers conditions for page templates
  • WP Option — allows templates to be displayed on certain settings stored in the options table. For example, to show a certain page if users can register on the site, one can set such a condition: “Include,” “Advanced,” “WP Option,” “users_can_register,” and “1”.
wp option conditions for page templates

WooCommerce

Warning

These conditions are available only if the WooCommerce plugin is installed and activated.

With the “WooСommerce” option, one can set the WooCommerce pages as the source.

woocommerce conditions for page templates

Several conditions can be set by hitting the “+ Add condition” button above the first condition.

several conditions for template

Also, conditions can be deleted by pressing the “trash” icon.

The condition settings will be saved by clicking the “Create” button. 

In the Theme Builder, the adjusted conditions are displayed at the bottom of the page template container.

adjusted conditions of the page template

Once the template is built, one can press the “threedots” icon and the “Edit conditions” button to open the conditions manager.

edit conditions button

That’s all about the conditions for the WordPress page templates that can be set with the JetThemeCore plugin.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 30K+ Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.