Divi Display Logic
***Read the exemplary Elegant Themes review and tutorial! here***
The revolutionary and original plugin for conditional logic in Divi, allows you to add logic/conditions (as many as you like!) to be used with any Divi element (module, child module, section, row). The plugin is incredibly easy to use in the Divi Visual Builder.
Ever had to remember to add a sale banner to your site at a certain time?
Want to show different slides in a slider module to different users or at different times?
Want to show different items in pricing table modules based on time or status?
Ever had to get up early to change time sensitive content?
Ever wanted to show a specific message to new users?
Simply put, you can decide when any of your content is shown and to whom based on any number of conditions you can set (or write yourself). The easiest example is differing content for logged in and out users but it doesn’t stop there.. you can show content based on date/time, location, user role, environment or anything else.
There are a number of pre-set examples and a polished interface to make using this plugin very easy indeed.
On activating the plugin you will see a new interface inside the Divi Visual Builder ‘Advanced’ tab. Look at the Custom Class/ID tab and you will notice a handy on/off switch to manage the logic/conditions. Inside the popup you will find full instructions and some handy controls to get the logic you want.
You might be thinking now “great idea but how would I use it??’. Here’s a few examples we’ve had so far from the community!
Show logged in or out slides in a slider module or schedule them to show/hide
Show a marketing homepage to logged out but show handy links/articles to those logged in
Create a simple teaser/locked content section based on a query string variable, post item, session variable or cookie!
Show members only content based on WordPress capability or role.
Show content to users in their language?
Use a pricing table but show certain prices to users based on their logged in/out status or the time/date
A restaurant business may wish to show the breakfast menu in the morning but the evening menu in the afternoon
An eCommerce store may wish to show documentation and post-purchase links to those who are logged in or have purchased (custom php filter)
Show an article or page to those who have signed up to a mailing list (custom php filter)
Show offers or holiday wishes on a per country basis..
Show adverts and offers only once – resetting every 30 days or so (configurable)
Hide your local offers to those who don’t live in the same city
And many more!
Out of the box there are LOTS of pre-defined conditions you can use. These range from the most basic show/hide based on logged/out status to something more complex like show/hide based on date/time constraints. See below for the full example list included the plugin:
SHOW this content on Christmas Eve 2017
HIDE this content on New Years Day 2018
SHOW this content to a specific user ID or several user IDs
SHOW the content for ONLY the 16th August 2017 (Sean’s Birthday!)
SHOW this content on Mondays ONLY
SHOW this content at 3pm and hide at 4pm
HIDE this content on Weekdays
SHOW this content if the current page has the category “News”. Note: term uses the slug
HIDE this content if the user IS logged out
HIDE this content if the user IS logged in
SHOW this content is a specific item is in the querystring (with optional value match)
HIDE this content is a specific item is in the querystring (with optional value match)
SHOW this content is a specific item is in the post array (with optional value match)
HIDE this content is a specific item is in the post array (with optional value match)
SHOW this content is a specific item is in the session (with optional value match)
HIDE this content is a specific item is in the session (with optional value match)
SHOW this content is a specific item is in the cookie array (with optional value match)
HIDE this content is a specific item is in the cookie array (with optional value match)
SHOW this content if the user has the Editor role
HIDE this content from users with the Subscriber role
SHOW this content if the user has the capability “view_content” (example. add your own)
SHOW this content if the user is in the UK or France
HIDE this content if the user is in the USA
SHOW this content to users if their language is English or German
HIDE this content to users if their language is French
HIDE this content after showing it only once (adverts/offers)
SHOW this content if the user is in the city of Chester, UK
HIDE this content if the user is in the town of London, UK
SHOW this content to user if PHP add_filter() returns true (advanced!). Supports up to 3 optional arguments.
HIDE this content from user if PHP add_filter() returns true (advanced!). Supports up to 3 optional arguments.
All of the built in examples can be edited. They are simply included to get you started. The date/time picker pre-fills the dates for you to minimise editing and the rest of the conditions are straightforward to edit to suit your needs.
Any encapsulating shortcode will work (one with a start and end tag) if you prefer to work directly with the shortcode. As long as the encapsulating shortcode alters the $content variable passed to the function based on your own condition this will work. To make things easier though you may prefer to use the built in add_filter example as it gives context to your shortcodes and allows you to add optional arguments which make it easier to read.
You’ll also find the ‘dss_prefill_options’ filter handy as it will pass the post type and an empty string for you to edit. This will allow you to add your own “option” html tags to the pre-defined logic dropdown. Just make sure that your shortcode is the “value” attribute and the plugin will do the rest!
You may install this product on any number of websites that you build for yourself or your clients. You will receive 6 months support and 12 months of updates from the date of purchase, after which you will have to purchase the product again at 50% of the initial purchase price.