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) and the Divi Builder plugin, version 3 or higher! Developer Filters Expression Validation Filters The following filters allow developers to customize expression validation behavior. Add these filters in your theme’s functions.php or in a custom plugin. content_visibility_for_divi_builder_blocked_functions Filter the array of blocked function names. Functions in this list will cause an expression to fail validation. All comparisons are case-insensitive. Example – allow file_get_contents (blocked by default): add_filter( 'content_visibility_for_divi_builder_blocked_functions', function( $functions ) { return array_diff( $functions, array( 'file_get_contents' ) ); } ); Example – block an additional function: add_filter( 'content_visibility_for_divi_builder_blocked_functions', function( $functions ) { $functions[] = 'my_dangerous_function'; return $functions; } ); content_visibility_for_divi_builder_allowed_tokens Filter the array of allowed PHP token types (T_* constants). Tokens not in this list will cause an expression to fail validation. This is an advanced filter – consult the PHP tokenizer documentation before modifying. Example – allow the T_VARIABLE token type (blocked by default, use with caution): add_filter( 'content_visibility_for_divi_builder_allowed_tokens', function( $tokens ) { $tokens[] = T_VARIABLE; return $tokens; } ); content_visibility_for_divi_builder_allowed_chars Filter the array of allowed single-character tokens. Characters not in this list (such as =, ;, {, }, `, @, &, |, ~, ^) will cause an expression to fail validation. Example – allow the & character for bitwise operations: add_filter( 'content_visibility_for_divi_builder_allowed_chars', function( $chars ) { $chars[] = '&'; return $chars; } ); content_visibility_for_divi_builder_allowed_callables Filter the array of callables (function names and Class::method static-method entries) the validator considers known-safe. Anything not on the allowlist (and not on the blocked_functions denylist) is treated as an “Unknown callable” error. Names are normalized (leading \ stripped, namespace\ keyword prefix stripped, lowercased) before comparison, so \My\Namespace\Class::method, My\Namespace\Class::method, and namespace\My\Namespace\Class::method all match the same allowlist entry. The default list ships with WordPress conditional tags (is_user_logged_in, current_user_can, is_admin, etc.). The Expression Validation tab’s content scanner generates a ready-to-paste snippet for this filter pre-populated with every custom callable currently in your content. Example – allowlist a theme helper and a static service method: add_filter( 'content_visibility_for_divi_builder_allowed_callables', function( $callables ) { $callables[] = 'mytheme_should_be_visible'; $callables[] = 'MyTheme\Visibility\Service::checkUser'; return $callables; } );
Top keywords
- divi12×2.85%
- builder11×2.61%
- divi builder11×2.61%
- filter11×2.61%
- visibility11×2.61%
- visibility for divi10×2.38%
- functions9×2.14%
- allowed8×1.90%
- function8×1.90%
- blocked7×1.66%
- content7×1.66%
- expression7×1.66%
Widget Visibility Control
Widget Visibility Control lets you decide exactly where each widget appears on your site. Show widgets only on specific pages, hide them for logged-out users, display different content for different categories – all without writing a single line of code. Looking for Widget Visibility and Scheduling? This plugin gives you control over where your widgets appear: Page targeting – Show widgets on the front page, blog page, specific pages, or 404 error page Content targeting – Display widgets only on certain categories, tags, or custom taxonomies Cascading taxonomy selector – Quickly find terms in sites with many taxonomies (WooCommerce friendly) Include child terms – Match child terms automatically for hierarchical taxonomies User targeting – Show different widgets to logged-in users vs. visitors Role-based display – Target specific user roles (administrators, editors, subscribers, etc.) Author pages – Control visibility on author archive pages Date archives – Target daily, monthly, or yearly archives Post type support – Works with custom post types and their archives Time scheduling – Schedule widgets to appear only during specific date and time ranges. Perfect for promotional banners, seasonal offers, holiday announcements, flash sales, event countdowns, and time-limited content Multiple Conditions Create sophisticated visibility rules by combining multiple conditions: Use OR logic – Show if ANY condition matches Use AND logic – Show only if ALL conditions match Mix and match – Create exactly the rules you need Built for Performance Minimal database queries with intelligent caching Only loads assets where needed (widget screens) Clean, optimized code following WordPress standards Why Choose This Plugin? Lightweight – Focused functionality without unnecessary features All features included – No premium version required Jetpack Compatible – Migrate from Jetpack Widget Visibility without reconfiguring anything Independent Storage – Your rules are stored separately, safe from Jetpack changes Block Editor Ready – Works with both classic widgets and block-based widgets Privacy Focused – No external connections, no tracking, no data collection Safe by design – No PHP eval, no arbitrary code execution; rules are stored as structured data Coming from Jetpack? If you’ve been using Jetpack just for widget visibility and want to reduce your site’s load, this plugin can help: No configuration needed – Your existing visibility rules are automatically imported on activation Same familiar interface – The visibility panel works as you’re used to Keep or clean legacy data – Choose to maintain Jetpack compatibility or clean up completely No disruption – Your widgets will continue working as before Coming from Widget Logic? Widget Logic has been closed on the WordPress plugin directory. Widget Visibility Control is a safe, maintained alternative: No PHP eval – Visibility rules are stored as structured data, not as executable PHP code Assisted import – On detection of Widget Logic data, an importer translates the most common conditional tags (is_home, is_page, is_category, is_user_logged_in…) into proper visibility rules. Works with data from both Widget Logic 5.x and 6.x You decide what’s tricky – For rules we can’t translate automatically, the importer asks per widget whether to import as always visible, always hidden, or skip Original data preserved – Your Widget Logic data stays in the database until you choose to clean it up Coming from Widget Options? If you only use Widget Options for visibility and want a lighter, focused plugin without the pro upsells: No pro version – All features included in the free plugin Visibility-first – We do one thing well: show/hide widgets based on pages, content, users, roles, and schedule Compatible interfaces – Works in the block-based widget editor, the classic widget editor, and the Customizer Quick try – Install alongside Widget Options to compare; switch when you’re ready Developer Friendly Follows WordPress Coding Standards Fully translatable with complete i18n support Action and filter hooks for customization Clean uninstall – removes only its own data Support Need private support or custom development? Do you need one-on-one help, priority troubleshooting, or a custom feature, integration, or tweak built specifically for your site? I offer private support and custom development. Just contact me and tell me what you need. Need help or have suggestions? Official website WordPress support forum YouTube channel Documentation and tutorials Love the plugin? Please leave us a 5-star review and help spread the word! About AyudaWP We are specialists in WordPress security, SEO, AI and performance optimization plugins. We create tools that solve real problems for WordPress site owners while maintaining the highest coding standards and accessibility requirements.