Conditional Blocks empowers you to create unique, dynamic content for your visitors and customers in the WordPress Block Editor. Effortlessly control the visibility of individual blocks, grouped blocks, nested blocks, and even reusable blocks – all without writing a single line of code.
Full Site Editing (FSE) support and works with the new Site Editor ensuring Conditional Blocks will remain powerful and versatile as WordPress evolves.
Why use Conditional Blocks?
- No coding required: Easily manage block visibility without writing a single line of code, perfect for users of all skill levels.
- Improve user experience: Personalize and tailor your website content according to visitor characteristics such as user role, device type, or location.
- Enhance content strategy: Schedule content, restrict access, and experiment with different variations to optimize your content for your audience.
- Optimize site performance: Reduce page loading time and improve user experience by hiding unnecessary or irrelevant content on specific devices or for specific users.
- Increase conversions: Display targeted promotions or call-to-actions (CTAs) to your audience, leading to higher conversion rates.
- Future-proof your site: With Full Site Editing (FSE) support planned, Conditional Blocks will remain a powerful and versatile tool for managing your site’s block visibility as WordPress continues to evolve.
By incorporating Conditional Blocks into your WordPress site, you can effortlessly create dynamic, responsive, and personalized content that increases user engagement and improves overall site performance.
What can Conditional Blocks do?
With a simple and intuitive interface, Conditional Blocks makes it easy to control the visibility of any block in just a few clicks. Some use cases for conditional content in WordPress include:
Types de conditions inclus dans la version gratuite :
- Create Custom Visibility Conditions for WordPress Blocks, such as user roles or membership levels.
- Hide blocks from everyone with the « Lockdown » condition, perfect for preparing new content or working on drafts.
- Display content exclusively for logged-in or logged-out users, ideal for membership site content.
- Control block visibility on mobile, tablet, and desktop screens for responsive designs.
- Customize screen sizes and breakpoints to match your theme.
Conditional Blocks seamlessly integrate with the new WordPress block widgets and FSE themes, enabling you to create conditional widgets in sidebars using any built-in visibility logic.
Supercharge your blocks with Conditional Blocks Pro
Conditional Blocks Pro offers unparalleled flexibility and versatility, allowing you to control block visibility with even more conditions such as WooCommerce conditional content and more.
- Set block visibility based on user roles (WooCommerce Customer, Admin, Editor, Subscriber, Custom Roles, etc).
- Schedule content with date ranges, times, or days of the week.
- Display blocks tailored to specific devices or browsers (iPhone, Android, macOS, Linux, Windows)
- Show or hide block content based on URL Referrer (e.g. when users come from Google or Twitter)
- Dynamically display blocks based on post meta fields or URL query strings, perfect for form plugins and custom data
- Control visibility for specific post IDs, URL Paths, or within custom post types, taxonomies, and terms
- Manage custom fields, user meta, or post meta-based visibility
- Toggle blocks in response to WordPress archives
- Save and apply presets of conditions across your entire site
- Create custom PHP or function-based conditions for virtually unlimited possibilities
- Leverage powerful WooCommerce-specific conditions, such as cart value, geo location, customer recent order, or products in cart, for dynamic upselling or smart marketing.
Experience even greater content control with Conditional Blocks Pro – fully compatible with FSE, widget options, and general content block manipulation.
See all features & benefits of Conditional Blocks Pro
Draft content on live pages
Use the Lockdown condition to create draft blocks inside live content, and simply remove the condition when you’re ready to publish.
Restrictive content made easy
Control access to any block by clicking on it within the Block Editor and using the Condition Builder to add visibility rules. Perfect for members-only content.
Responsive designs simplified
Effortlessly adapt your blocks for mobile, tablet, or desktop display, automatically showing or hiding content according to screen sizes.
Conditional Blocks works with any theme or plugin that uses the WordPress Block Editor (Gutenberg).
Tested and compatible with:
- Stackable Blocks
- Atomic Blocks
- WooCommerce Blocks (Product Blocks)
- Easy Digital Downloads Blocks
- Ultimate Addons for Gutenberg
- Otter Blocks & Templates
- Kadence Blocks
- Genesis Blocks
- Twenty Twenty-Two theme
- Wabi theme
- Poe theme
- WooCommerce Storefront
For support or help with other plugins, please get in touch.
- Documentation: Learn how to set up and use our features.
- Blog: Read our guides and tutorials.
- Website: Find out more about us and the pro version.
- Twitter: Follow us on Twitter.
Conditional Blocks Installation Instructions:
- Upload the Conditional Blocks plugin to your /wp-content/plugin/ directory or through the plugin admin section under « add new ».
- Activate the plugin through the ‘Plugins’ menu in WordPress.
Can I conditionally hide blocks?
Yes! You can conditionally hide any Gutenberg block using the available condition types.
Does Conditional Blocks work for block widgets?
Absolutely! Conditional Blocks integrates with Widget areas and sidebars in WordPress 5.8+.
Can I control the visibility of nested blocks inside a Group Block?
Definitely! Apply conditional visibility rules to Group Blocks and nested blocks, with additional rules customizable for each nested block.
Can I add custom conditions to my content?
With Conditional Blocks Pro, you can leverage the PHP logic condition to create custom visibility conditions for your blocks.
Can I display dynamic content based on user location?
Yes! With Conditional Blocks Pro, you can use geolocation conditions to display or hide blocks based on the user’s country. Perfect for showcasing relevant content tailored to the user’s location.
Can I control content visibility for A/B testing or multiple variations?
Conditional Blocks does not currently offer built-in A/B testing functionality or variation management. However, you can use custom conditions in Conditional Blocks Pro alongside third-party A/B testing tools, setting the visibility of different content variations for different user segments.
Is it possible to display content only for users who have viewed specific pages on my site?
While not a built-in feature, you can achieve this by leveraging custom conditions in Conditional Blocks Pro. Using cookies or other tracking methods, you can store a record of viewed pages and create a custom visibility condition that responds to this user-specific data.
Can I show or hide content based on form submissions or user input via forms?
Yes! With Conditional Blocks Pro, you can create custom visibility conditions that rely on URL query strings or post meta fields. This is useful when working with form plugins such as Gravity Forms, enabling you to dynamically display content based on user input or form submissions.
How do I request a feature?
We’re always eager to hear your ideas! Reach out to us via support and share your thoughts.
Contributeurs/contributrices & développeurs/développeuses
« Conditional Blocks – Advanced Content Visibility Control and Full Site Editing » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.Contributeurs
“Conditional Blocks – Advanced Content Visibility Control and Full Site Editing” a été traduit dans 2 locales. Remerciez l’équipe de traduction pour ses contributions.
Traduisez « Conditional Blocks – Advanced Content Visibility Control and Full Site Editing » dans votre langue.
Le développement vous intéresse ?
Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.
- Ready and tested for WordPress 6.2.
- Ready for WordPress Site Editor.
- Change: Requires minimum of PHP 7.
- New: Allow the WooCommerce Cart Products condition to require ‘all’ or ‘any’ of the selected products [PRO].
- New: Allow the Query String condition to trigger when a patterns are ‘Not Present’ [PRO].
- Improvement: Conditionally remove the Conditional Blocks attributes on REST API requests where not needed.
- Improvement: Refactored logic for detecting which version of Conditional Blocks a block was created with, this prevents edge cases during render.
- Ready and tested for WordPress 6.1
- Fixed: Consistenty for labels and help text for conditions fields with the Conditions API.
See all the details: Release post for Conditional Blocks v3
- New: OR logic is now possible by creating multiple Condition Sets per block.
- New: Integration API to register custom conditions. Custom Conditions are added directly to the Condition Builder. See our Developer Integration Guide.
- Improved: UI has been refined.
- Improved: Automatically a default condition to reduce clicks when opening the Condition Builder.
- Tested: WooCommerce 7.0 Ready
- New: WooCommerce Customer Geo Location Condition (Pro)
- New: WooCommerce Customer Recent Order Condition (Pro)
- Improved: PHP Logic now shows all registered custom function within the Condition Builder. (Pro)
- Improved: Increased the height and width of the Condition Builder for easier navigation.
- Fixed: Typos.
- Tested and ready for WordPress 6.0 & Full Site Editing.
- Tested and ready for WordPress 5.9
- Improved: Code Refactored
- Improved: Refined the indicator when a block is conditional within the WordPress editor.
Read the full release notes
Tested and ready for WordPress 5.8
New: Lockdown Condition (Hide block for everyone).
New: Most conditions now have a selectable « Block Action » where you can choose if the block should be visible or hidden when the condition is met.
Improved: UI – easily to select your options, the modal is now slimmer, matching the current WordPress Admin UI colors.
Improved: Refactored condition checking.
Improved: Fully translatable.
Release notes: https://conditionalblocks.com/v2-3-woocommerce-condition/
- Improved and categorised the condition selector, now with « type to search » support.
Conditional Blocks Pro
* New – WooCommerce support available in Conditional Blocks Pro. Control the visibility of blocks using the customers total cart value.
- Improved performance by only including the CSS for responsive blocks on the pages they are used.
Complete rebuild of Conditional Blocks. Please read the 2.0 introduction & release notes https://conditionalblocks.com/introducing-conditional-blocks-2-0/
- Conditional Blocks 2.0 is a complete rebuild.
- Existing users can safely update, old conditions will continue to work in the background. Editing blocks with old conditions will require clicking « Convert to 2.0 conditions », when opening the new Condition Builder.
- Ready for WordPress 5.7 and Gutenberg 10.1
- Fixed: Inner blocks conditions work as expected again.
- Ready and tested with WordPress 5.6
- Improved compatibility with themes that could be overriding css. https://wordpress.org/support/topic/maybe-adds-important-css-rules/
- Tested: with GenerateBlocks.
- Fixed: Added a fix to the issue where server side rendered blocks would cause errors with Conditional Blocks. https://github.com/WordPress/gutenberg/issues/16850
- Ready for WordPress 5.5
- Added feature to modify the CSS breakpoints.
- Updated date range conditions in Conditional Blocks Pro
- Fixed issue where MomentJS could not be found in Conditional Blocks Pro
- Ready and tested with WordPress 5.4
- Pro: Fixed date conditions sometimes applying to new blocks when new dates are added.
- Minor code improvements.
- Tested with Gutenberg 7.7.1
- Improved how device size conditions are handled across all blocks.
- Fixed hiding on device sizes across could cause full-width blocks to be standard size.
- Fixed Conditional Blocks highlighting for Gutenberg 7.4+
- Fixed postmeta condition being skipped.
- Fixed postmeta condition saving incorrectly on blocks.
- Removed Freeemius and tracking.
- New Date Range Conditions for Blocks in Pro! Learn about Date Conditions
- Improved JS browser caching with file versions.
- Improved code structure.
- Fixed conflict with Yoast and other plugins which triggers Gutenberg by using React.
- initial Release of Conditional Blocks for Gutenberg.