The Visibility Conditions Feature - Otter Features Library

The  conditional loading is a feature that applies to all blocks within the Otter Library and Gutenberg and is represented by the Visibility Condition. It gives the user control of the visibility of the blocks based on the conditions inserted.

The feature can be accessed from the right sidebar under the Block Tools section. Click on the ➕ icon, then select the Visibility Conditions. A new accordion will appear, where you can configure the conditions.


🧰 Using the Feature

1
To start the process, click on the Add Rule Group.
2
Expand the Rule Group accordion.
3
Select one of the  conditions displayed there.
4
Click on the  Add a New Condition button.
5
Navigate to the website and check if the condition works.

📝 Note: If you are not able to see the Visibility Condition, check in Dashboard > Otter > Settings and enable the Visibility Condition Module.

📝 Note: There can be many Rule Groups, but they will not be applied simultaneously, but one or the other (OR logical operation).


🔄 Available Conditions

There are a lot of options that you can choose from the dropdown:

Users conditions - related to the users' status:
  • Logged In Users - the block will be displayed only for the users that are logged in.
  • Logged Out Users - the block will be displayed only for the users that are logged out.
  • User Roles - the block will be displayed only for certain users, such as administrators, editors, authors, and others. The user roles can be added by selecting them from the list.
  • 💳 (PRO) Logged-in User Meta - this block will be displayed based on the meta of the logged-in user, which can be added in the meta key field.

Posts conditions - related to post elements:
  • Post Author - the block will be displayed if the post authors are the ones that you have introduced into the field.
  • Post Type - the block will be displayed if the post type is one of the selected types ( e.g. post, page, product ).
  • Post Category - the block will be displayed if the post is part of a selected category.
  • 💳 (PRO) Post Meta - the block will be displayed based on the post meta condition. The meta key can be added in the blank field. In order to use this one, you should install the Advanced Custom Fields plugin, create such a field, copy its name, and paste it into the Meta Key field.

Advance 
  • Screen Size - the block will be hidden on different screen types: Mobile/Tablet/Desktop. For example, you can hide one column of the section block on mobile.
  • 💳 Query string - the block will be displayed if the URL contains the specified parameters you add to the Query String field. Check this doc for more details. You can control if the URL should contain any or all parameters.
  • 💳 Country - the block will be visible according to the country code you set.
  • 💳 Cookie - block will be visible based on the PHP cookies you use to compare. Check this doc for more details.

Date & Time conditions - based on the time and date ( 💳 PRO only ):
  • Date Range - the block will be displayed if the current date is between the start and end date ( optional ).
  • Date Recurring - the block will be displayed on certain days, according to the ones picked by you.
    • 📝Note: You can use the date recurring in combination with other date & time conditions.
  • Time Recurring - the block will be displayed if the current time is between the start and the end time you introduce.

Stripe - based on the Stripe Checkout block.
  • Purchase history - certain blocks can be visible or hidden based on the history.

There are some extra visibility conditions available for the PRO version that depend on the installed plugins:

WooCommerce conditions - related to e-commerce accessibility:
  • Products in Cart - the block will be displayed if the user has certain products or products from certain categories in the cart.
    • 📝Note: The product/category can only be added in the blank field by selecting them from the list.
  • Total Cart Value - the block will be displayed if the total cart value is greater / less than the value established by you.
  • Purchase History - the block will be displayed if the client's product history contains the products you inserted.
    • 📝Note: The product can be added in the blank field only by selecting them from the list.
  • Total Spent - the block will be displayed if the user has spent a certain amount of money ( greater / less than the value inserted by you ).

LearnDash conditions - related to learning:
  • Purchase History - the block will be displayed if the product history contains the courses inserted by you.
  • Course Status - the block will be displayed if the user has completed / not completed certain courses. 

🎥 Video - Exploring the Visibility Conditions

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us