Zephyr Knowledge Base Elements Display Logic Settings

Display Logic Settings

Display Logic is a tool to define conditions for displaying some content on your website. At the moment Display Logic settings are available for the following elements (in both Live and WPBakery builders):

  • Row/Section
  • Inner Row
  • Text Block
  • Horizontal Wrapper
  • Vertical Wrapper

2721.png

2735.png

Conditions Matching Logic #

By default, every element you create is set to display always.

Depending on your preferences, you can use one or multiple conditions defining if the element should be visible. To set up a matching condition, pick the relevant option in the Display this Element dropdown: 

  • Always - default option, the element is always visible. 
  • If EVERY condition below is met - the element will be visible if all conditions you specify are met at the same time
  • If ANY condition below is met - the element will be visitble if at least one condition you specify is met. 

Once you pick the condition matching logic, you can start adding conditions by clicking the Add button: 

2723.png

Conditions #

Date and Time #

This condition allows setting up a date and time when the element should start or stop showing. Use the Since option to set up a start date or Until for the end.

2725.png

Time takes into account the "Timezone" value specified in Settings > General admin page.

To specify both start and end date, you can use this condition two times with the "EVERY condition below is met" matching logic.

Post Type #

This condition allows showing the element based on the WordPress post type. You can Include or Exclude certain post type by using the relevant switch and dropdown list:  

2726.png

To include or exclude multiple post types, you can use this condition multiple times with the relevant "Display this Element" matching logic. 

Post ID #

This condition allows showing the element based on the current WordPress post ID. You can specify a single value or multiple comma-separated values to Include or Exclude multiple IDs: 

2727.png

You can find post ID in the URL while editing the relevant post, in the `?post=<number>` URL parameter.

Taxonomy Term #

This condition allows showing the element based on the specified taxonomy and its value(s). This condition works for both post and term pages.

You can Include or Exclude term values by specifying the slugs or IDs. To specify multiple values, fill them in comma-separated. 

2728.png

You can find relevant slugs to specify as values by opening the relevant taxonomy.

2736.png

User Role #

This condition allows showing the element based on the WordPress user role of the site visitor. You can Include or Exclude a certain role by picking it from the dropdown list. 

2729.png

To include or exclude several roles, you can add this condition several times with the relevant "Display this Element" matching logic. 

User State #

This condition allows showing the element based on the visitor being logged in or not. Just pick the relevant switch position. 

2730.png

Custom Field #

This condition allows showing the element based on the custom field value specified for the visited page. This works both for post and term pages.

For a "Field Name" field use the slug, not title. Multiple values are not supported, but you can add several "Custom Field" conditions if needed.

2737.png

Cart Status #

This condition allows showing the element based on the WooCommerce cart status for the current visitor. Pick the relevant switch to define if the cart should be empty or not.

2732.png

Note that this condition implies the WordPress WooCommerce plugin installed and activated on your site. In case if it's not - using this condition will keep the element hidden.

Usage Examples #

Showing an element for several days #

  • Display this Element: if EVERY condition below is met
  • Date/Time > Since > Mar 10
  • Date/Time > Until > Mar 14

2733.png

Showing an element for posts and pages #

  • Display this Element: if ANY condition below is met
  • Post type includes posts
  • Post type includes pages

2734.png

Showing an element if the custom field is NOT empty #

  • Display this Element: if EVERY condition below is met
  • Custom field <your_field_name> Excludes <empty value>

2738.png