{"id":372171,"date":"2026-09-24T19:04:17","date_gmt":"2026-09-24T19:04:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wbd-conditional-block\/"},"modified":"2026-09-24T19:04:01","modified_gmt":"2026-09-24T19:04:01","slug":"wbd-conditional-block","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wbd-conditional-block\/","author":23409020,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"1.0.1","tested":"7.1.2","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"WBD Conditional Block","header_author":"WPBrand Digital","header_description":"Show or hide any Gutenberg block based on login status, user role, device, date\/time, page type, country, WooCommerce, custom fields, language, and A\/B testing \u2014 with AND\/OR logic and built-in analytics. All features are free.","assets_banners_color":"c6cce0","last_updated":"2026-09-24 19:04:01","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/wpbranddigital.org","rating":0,"author_block_rating":0,"active_installs":0,"downloads":31,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"wpbranddigital25","date":"2026-09-24 19:04:01","revision":3711902}},"upgrade_notice":{"1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3711915,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3711902,"resolution":"772x250","location":"assets","locale":"","width":2204,"height":713}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"The Conditional Visibility panel in the block editor sidebar.","2":"Adding a condition with AND\/OR logic.","3":"The Analytics dashboard showing shown\/hidden trends per block.","4":"A block hidden on the frontend for a logged-out visitor."}},"plugin_section":[],"plugin_tags":[1588,232345,47354,148076,286],"plugin_category":[45],"plugin_contributors":[252525],"plugin_business_model":[],"class_list":["post-372171","plugin","type-plugin","status-publish","hentry","plugin_tags-a-b-testing","plugin_tags-block-visibility","plugin_tags-conditional-content","plugin_tags-gutenberg","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-wpbranddigital25","plugin_committers-wpbranddigital25"],"banners":{"banner":"https:\/\/ps.w.org\/wbd-conditional-block\/assets\/banner-772x250.png?rev=3711902","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wbd-conditional-block\/assets\/icon-128x128.png?rev=3711915","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>WBD Conditional Blocks<\/strong> adds a \"Conditional Visibility\" panel to the settings sidebar of <strong>every<\/strong> block in the WordPress block editor \u2014 not just a special block of its own. Turn it on, add one or more conditions, choose AND\/OR logic, and the block will only render for visitors who match your rules. Everything in this plugin is free.<\/p>\n\n<h4>Why WBD_Conditional_Block<\/h4>\n\n<ul>\n<li><strong>Works on any block.<\/strong> Paragraphs, images, buttons, columns, WooCommerce blocks, third-party blocks \u2014 if it's a Gutenberg block, it can be made conditional.<\/li>\n<li><strong>Lightweight.<\/strong> No bloated block library, no page builder \u2014 just the visibility layer, on top of the blocks you already use.<\/li>\n<li><strong>Everything is free.<\/strong> Every condition type below, AND\/OR logic, analytics, and A\/B testing are included at no cost.<\/li>\n<\/ul>\n\n<h4>Condition types<\/h4>\n\n<ul>\n<li><strong>Login Status<\/strong> \u2014 logged in vs. logged out<\/li>\n<li><strong>User Role<\/strong> \u2014 Administrator, Editor, Subscriber, WooCommerce Customer, or any custom role<\/li>\n<li><strong>Device Type<\/strong> \u2014 Mobile, Tablet, Desktop<\/li>\n<li><strong>Date\/Time<\/strong> \u2014 a specific date range, or a recurring day of the week (with optional time window) \u2014 great for countdowns and limited-time sales<\/li>\n<li><strong>Page\/Post Type<\/strong> \u2014 front page, blog index, search results, 404, any archive, specific post types, or specific posts\/pages by name<\/li>\n<li><strong>Geolocation<\/strong> \u2014 show content to visitors from specific countries (uses a CDN header when available, e.g. Cloudflare, with a cached free API fallback)<\/li>\n<li><strong>Browser<\/strong> \u2014 Chrome, Firefox, Safari, Edge, Opera<\/li>\n<li><strong>Operating System<\/strong> \u2014 Windows, macOS, Linux, iOS, Android<\/li>\n<li><strong>Referrer URL<\/strong> \u2014 traffic from Google, Facebook, direct visits, or any custom domain<\/li>\n<li><strong>Query String<\/strong> \u2014 show content when a URL parameter is present (e.g. <code>?source=facebook<\/code>)<\/li>\n<li><strong>Cookies<\/strong> \u2014 match a visitor's cookie name\/value (e.g. \"has visited before\")<\/li>\n<li><strong>WooCommerce<\/strong> \u2014 cart contents, cart value, purchase history, lifetime spend, guest vs. customer<\/li>\n<li><strong>Custom Fields<\/strong> \u2014 ACF field values, or plain post meta<\/li>\n<li><strong>Language<\/strong> \u2014 the site's active locale or the visitor's browser language<\/li>\n<li><strong>A\/B Test Variant<\/strong> \u2014 randomly (and consistently) split visitors 50\/50 between two versions of a block, then compare performance in the built-in analytics<\/li>\n<\/ul>\n\n<h4>AND \/ OR logic<\/h4>\n\n<p>Combine multiple conditions on one block and choose whether <strong>all<\/strong> of them must match (AND) or <strong>any<\/strong> of them (OR).<\/p>\n\n<h4>Conditional Group block<\/h4>\n\n<p>Need to hide several blocks together, or wrap content that doesn't have its own settings panel? Add the <strong>Conditional Group<\/strong> block, drop any blocks inside it, and apply one rule set to the whole group.<\/p>\n\n<h4>Built-in analytics<\/h4>\n\n<p>Every conditional block reports how many times it was shown vs. hidden. View daily trends and per-block totals \u2014 including the A\/B variant split \u2014 from <strong>WBD_Conditional_Block \u2192 Analytics<\/strong> in your dashboard. No data leaves your site.<\/p>\n\n<h4>White-label<\/h4>\n\n<p>Rename the plugin's dashboard menu and pages to your own brand from <strong>WBD_Conditional_Block \u2192 Settings<\/strong> \u2014 handy for agencies building on client sites.<\/p>\n\n<h3>Development<\/h3>\n\n<p>Public source code repository:\nhttps:\/\/github.com\/wpbranddigital\/wbd-conditional-block<\/p>\n\n<p>Build Instructions:<\/p>\n\n<ol>\n<li>npm install<\/li>\n<li>npm run build<\/li>\n<li>npm run start (development)\nWBD Conditional Block is built using @wordpress\/scripts.<\/li>\n<\/ol>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to a free external geolocation API (<code>ip-api.com<\/code>) to determine a visitor's country when the \"Geolocation\" condition is used. \nIt sends the user's IP address to the API to obtain their country code, allowing the block visibility rules to work. The results are cached per IP to minimize requests. This service is provided by Artia International (ip-api.com). \nPlease review their <a href=\"https:\/\/ip-api.com\/docs\/legal\">Terms of Service<\/a> and <a href=\"https:\/\/ip-api.com\/docs\/legal\">Privacy Policy<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>wbd-conditional-block<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install directly from Plugins \u2192 Add New.<\/li>\n<li>Activate the plugin through the \"Plugins\" screen in WordPress.<\/li>\n<li>Open any post or page in the block editor, select a block, and open the \"Conditional Visibility\" panel in the settings sidebar (right-hand panel).<\/li>\n<li>Enable it, add a condition, and publish. That's it.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20work%20with%20any%20theme%3F\"><h3>Does this work with any theme?<\/h3><\/dt>\n<dd><p>Yes. The plugin only affects whether a block's HTML is output; it doesn't change markup or styling, so it works with any block theme or classic theme that supports the block editor.<\/p><\/dd>\n<dt id=\"does%20this%20slow%20down%20my%20site%3F\"><h3>Does this slow down my site?<\/h3><\/dt>\n<dd><p>No. All checks run in plain PHP with no database queries in the common cases, and the geolocation lookup (the only condition that can call an external service) is cached per visitor for 12 hours.<\/p><\/dd>\n<dt id=\"can%20i%20use%20this%20with%20woocommerce%3F\"><h3>Can I use this with WooCommerce?<\/h3><\/dt>\n<dd><p>Yes \u2014 the WooCommerce condition type is built in and only activates when WooCommerce is installed and active.<\/p><\/dd>\n<dt id=\"where%20is%20analytics%20data%20stored%3F\"><h3>Where is analytics data stored?<\/h3><\/dt>\n<dd><p>In a small table in your own WordPress database. No data is sent anywhere else.<\/p><\/dd>\n<dt id=\"what%20happens%20to%20a%20block%20if%20i%20deactivate%20the%20plugin%3F\"><h3>What happens to a block if I deactivate the plugin?<\/h3><\/dt>\n<dd><p>It simply renders normally again (unconditionally visible). No content is deleted; the condition settings stay stored on the block and reappear if you reactivate the plugin.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fix: Removed \"Tested up to\" tag from the main plugin file.<\/li>\n<li>Fix: Added unique prefixes (<code>WBDCOBL_<\/code>, <code>wbdcobl_<\/code>) to all functions, classes, globals, and stored data to avoid naming collisions.<\/li>\n<li>Fix: Added documentation in <code>readme.txt<\/code> disclosing the use of the <code>ip-api.com<\/code> external geolocation service.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: 15 condition types, AND\/OR logic, quick templates, the Conditional Group block, built-in analytics, A\/B testing, developer API, and white-label settings \u2014 all free.<\/li>\n<\/ul>","raw_excerpt":"Show or hide any Gutenberg block based on login status, user role, page type, WooCommerce and A\/B testing.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/372171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=372171"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/wpbranddigital25"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=372171"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=372171"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=372171"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=372171"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=372171"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=372171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}