Content Visibility for Divi Builder


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!


  • The Content Visibility option in the Divi 4.x interface.

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

  • The Content Visibility option in the 3.x and older Divi Builder backend interface.


  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.


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 in each Section or Module’s settings on either the Advanced tab under Visibility (for Divi 4.x) or the General Settings / Content tab (for Divi 3.x or lower.)

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.

NOTE: Complex expressions are usually best entered as a custom function call defined in a child theme or plugin!
So, for example, you could enter my_custom_function() in the Content Visibility option, and then define that function (returning true or false) in your child theme’s functions.php.
If there are several common boolean expressions you use, this also has the added benefit of allowing you to change the behavior of your content by simply modifying the function body once instead of re-entering Content Visibility options all over the place.


January 25, 2021
Une extension indispensable que j'utilise avec Advanced Custom Fields sur mes sites Divi. Elle permet notamment de masquer les champs personnalisés vides.
January 14, 2021
Exactly what I was looking for.
December 30, 2020
I am able to use this plugin in conjunction with Advanced Custom Fields to conditionally display Divi modules on the front end. How conditional visibility is not native Divi functionality I have no idea, but you just saved me a huge headache. Thank you for this!!!!
December 22, 2020
Great plugin. Thank you for making and maintaining it! It turns a simple brochure site into a powerful platform. I had a challenge with query variables similar to some of the threads in the support forums. I solved it by creating a function in my child theme functions.php. Here's an example: function is_post_type($type='post') { global $post_type,$typenow; if (isset( $_GET['post_type'] )&& $_GET['post_type'] == $type || isset( $post_type ) && $post_type == $type || isset( $typenow ) && $typenow == $type) return true; // return true if on a page of type $type return false; } I used the above function is_post_type instead of the $_GET statement to dodge any code that was sanitizing my input. Edit: Above function's just an example. I had a unique situation for using post type from query variables, otherwise, there are better ways of creating a post type conditional using the built-in WordPress hooks
Read all 74 reviews

Contributors & Developers

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




  • Fix the behavior of content_visibility_for_divi_builder_shortcode_* filters.


  • Emergency hotfix for crash introduced in 3.13.


  • Fix PHP v7.4.x notice spam with recent Divi versions.


  • Fix interoperability issues with newer WordPress versions.
  • Fix issues with Divi Builder 4.x releases.


  • Remove hold harmless agreement.


  • Remove usage tracking entirely.
  • Fix request parameter sanitization.


  • Fix optional usage tracking.
  • Fix an interoperability issue with other Divi module extender plugins.


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


  • Fix missing ET_BUILDER_DIR . ‘layouts.php’.


  • Fix version checker options.


  • Update license terms.


  • 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!


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


  • Fix distributable…


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


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


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


  • 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”.


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


  • Call load_plugin_textdomain().


  • Added i18n support.


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


  • Initial Release