Content Visibility for Divi Builder

Description

Content Visibility for Divi Builder allows Sections and Modules to be displayed/hidden based on the outcome of a PHP boolean expression.

This plugin is for both the standalone Divi theme (or child themes thereof) or the Divi Builder plugin, versions 2.6 or higher!

Screenshots

  • The Content Visibility option in the classic Divi Builder backend interface.

  • The Content Visibility option in the Divi 3.x Visual Builder interface.

Installation

  1. Upload the plugin files to the /wp-content/plugins/content-visibility-for-divi-builder directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. You’re Done! You will notice that Section and Module settings dialogs will now have “Content Visibility” as a configurable setting.

FAQ

Will this work for any module, even custom ones?

Yes! It detects and modifies Modules and Sections by class inheritance. As long as Elegant Themes continues to have a single root class for everything, this plugin should detect all of them, including third party ones!

What if I deactivate this plugin? Will all of my content reappear automatically?

Yes. If you decide to deactivate or uninstall this plugin, the “Content Visibility” configuration option will disappear from the Divi Builder, and will not have any effect on the frontend output.

Of course, the “Content Visibility” settings that were defined for a particular Section or Module will continue to persist in the database, until that post/page is updated.
This can be a good thing, however, as you may want to reinstall/reactivate in the future and not have to re-enter all of your “Content Visibility” expressions!

How do I use it!?

Once the plugin is installed and activated, a “Content Visibility” option will appear under the General Settings / Content tab of each Section or Module’s settings.

You may enter any PHP boolean expression you would like, (e.g. is_user_logged_in()), and the Section or Module will only display if the expression evaluates to true.

Reviews

June 9, 2019
I had a hard time finding the setting to do the boolean expression, turns out it's under the very first expanding option. If you Divi search in the popup for Content Visibility, the field shows. Would be nice if it said, "Content Visibility" instead of Section, Row, Code, etc... Otherwise, the exact thing needed for getting Divi to show/hide content based on permission tags. Thanks!
March 8, 2019
This is one of those things I've been wishing for in Divi for a long time. I suggested they add options to inject shortcodes into sections, rows, and modules, so that shortcode would "surround" it. This is so much easier/simpler in many ways. On one site I put together a global login section with a login form and a CTA module telling people to sign up, if they hadn't joined, so they could login. But once logged in, they can see their donation info from GiveWP, purchases from WooCommerce, etc.
February 8, 2019
So handy, I don't know why it wasn’t included in the mothership package.
February 2, 2019
Exactly what I needed. If there is a list of common functions available for use, would be nice to have them listed somewhere obvious on this plugin page. Maybe I missed them.
December 7, 2018
Needed a way of scheduling a WhatsApp button to appear during office hours and got it right with the plugin. Thanks guys!
Read all 41 reviews

Contributors & Developers

“Content Visibility for Divi Builder” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

3.08

  • Fix deprecation notice spam. Thanks to Ben Harper of 3dtek.xyz!

3.07

  • Fix missing ET_BUILDER_DIR . ‘layouts.php’.

3.06

  • Fix version checker options.

3.05

  • Update license terms.

3.04

  • Fix the issue wherein builder-fixes.js forces builder.js to be loaded in the header instead of in the footer. Special thanks to @kihoshin for helping to locate this error!

3.03

  • Better multisite support.
  • Remove the need to clear local storage in modern browsers to see the “Content Visibility” settings on Sections / Modules.

3.02

  • Fix distributable…

3.01

  • Fix “Currently Available Module-Specific Actions and Filters” tab not displaying available actions and filters in the Module Extender API Reference.

3.00

  • Add support for Visual Builder in Divi 3.x.

2.02

  • Fix Builder UI to handle ‘]’ characters in Content Visibility expressions.

2.0.0

  • Add Module Extender for Divi Builder functionality; see API page after upgrading under Tools -> Module Extender API Reference.
  • Add usage tracking. If you prefer not to submit your usage data, this can be disabled on the plugins page by clicking “Disable anonymous usage tracking”.

1.0.4

  • Add links to ratings and reviews to help spread the word.

1.0.3

  • Call load_plugin_textdomain().

1.0.2

  • Added i18n support.

1.0.1

  • Fix handling of double quotes in Content Visibility expression. Thanks to Dave Bullock of memberium.com!

1.0.0

  • Initial Release