Block Logic – Full Block Display Control
by landwire 5 (13 reviews)

Block Logic

Block Logic adds a "Block Logic" field to the block editor, that lets you show or hide any block based on conditions.

Block Logic ranks #10,394 among WordPress.org plugins with 300+ active installations, a 5/5 rating from 13 reviews, and was last updated May 30, 2026. Data from WordPress.org, refreshed twice daily — see methodology.

Compatible with WP 7.0.2
v2.1.6 Current Version v2.1.6
Updated 1 month ago Last Update on 30 May, 2026
Refreshed 10 hours ago Last Refreshed on
View on WordPress.org
Rank
#10,394
No change
Active Installs
300+
No change
KW Avg Position
74
-0.8 better
Downloads
6.1K
+1 today
Support Resolved
100%
No change
Rating
100%
Review 5 out of 5
5 (13 reviews)

Next Milestone 400

Total Progress 75%
300+ 400+
324
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro

Unlock Exact Install Count

See the precise estimated active installs for this plugin, calculated from real-time ranking data.

  • Exact install estimates within tiers
  • Track install growth over time
  • Milestone progress predictions
Upgrade to Pro
Need 25 more installs to reach 400+

Rank Changes

10,338 10,358 10,377 10,397 10,416 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026
10,336 10,356 10,376 10,396 10,416 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026
10,336 10,356 10,376 10,396 10,416 26-06-2026 27-06-2026 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026
10,321 10,348 10,375 10,401 10,428 27-04-2026 28-04-2026 29-04-2026 30-04-2026 01-05-2026 02-05-2026 03-05-2026 04-05-2026 05-05-2026 06-05-2026 07-05-2026 08-05-2026 09-05-2026 10-05-2026 11-05-2026 12-05-2026 13-05-2026 14-05-2026 15-05-2026 16-05-2026 17-05-2026 18-05-2026 19-05-2026 20-05-2026 21-05-2026 22-05-2026 23-05-2026 24-05-2026 25-05-2026 26-05-2026 27-05-2026 28-05-2026 29-05-2026 30-05-2026 31-05-2026 01-06-2026 02-06-2026 03-06-2026 04-06-2026 05-06-2026 06-06-2026 07-06-2026 08-06-2026 09-06-2026 10-06-2026 11-06-2026 12-06-2026 13-06-2026 14-06-2026 15-06-2026 16-06-2026 17-06-2026 18-06-2026 19-06-2026 20-06-2026 21-06-2026 22-06-2026 23-06-2026 24-06-2026 25-06-2026 26-06-2026 27-06-2026 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026
Current #10,394
Change
Best #

Upgrade to Pro

Unlock 30-day and 90-day rank history charts with a Pro subscription.

Upgrade Now

Active Installs Growth

Active Installs 0,000,000+
Growth +0.0%
Peak 0,000,000

Downloads Growth

0 10 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026
0 10 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026
0 10 20 26-06-2026 27-06-2026 28-06-2026 29-06-2026 30-06-2026 01-07-2026 02-07-2026 03-07-2026 04-07-2026 05-07-2026 06-07-2026 07-07-2026 08-07-2026 09-07-2026 10-07-2026 11-07-2026 12-07-2026 13-07-2026 14-07-2026 15-07-2026 16-07-2026 17-07-2026 18-07-2026 19-07-2026 20-07-2026 21-07-2026 22-07-2026 23-07-2026 24-07-2026 25-07-2026 26-07-2026
0 50 100 150 27-04-2026 30-04-2026 03-05-2026 06-05-2026 09-05-2026 12-05-2026 15-05-2026 18-05-2026 21-05-2026 24-05-2026 27-05-2026 30-05-2026 02-06-2026 05-06-2026 08-06-2026 11-06-2026 14-06-2026 17-06-2026 20-06-2026 23-06-2026 26-06-2026 29-06-2026 02-07-2026 05-07-2026 08-07-2026 11-07-2026 14-07-2026 17-07-2026 20-07-2026 23-07-2026 26-07-2026
0 50 100 150 26-07-2025 07-08-2025 19-08-2025 31-08-2025 12-09-2025 24-09-2025 06-10-2025 18-10-2025 30-10-2025 11-11-2025 23-11-2025 05-12-2025 17-12-2025 29-12-2025 10-01-2026 22-01-2026 03-02-2026 15-02-2026 27-02-2026 11-03-2026 23-03-2026 04-04-2026 16-04-2026 28-04-2026 10-05-2026 22-05-2026 03-06-2026 15-06-2026 27-06-2026 09-07-2026 21-07-2026 26-07-2026
Downloads
Growth
Peak

Upgrade to Pro

Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.

Upgrade Now

Reviews & Ratings

5.0
13 reviews
Overall 100%
5
13 (100%)
4
0 (0%)
3
0 (0%)
2
0 (0%)
1
0 (0%)

Tracked Keywords

Showing 5 of 5
Keyword Position Change Type Updated
logic 18 Tag 22 hours ago
conditions 60 Tag 22 hours ago
visibility 62 Tag 22 hours ago
block 113 Tag 22 hours ago
conditional 117 Tag 22 hours ago

Unlock Keyword Analytics

Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.

  • Full keyword position tracking
  • Historical ranking data
  • Competitor keyword analysis
Upgrade to Pro

Support Threads Overview

Resolved
Unresolved
1
Total Threads
1
Resolved
0
Unresolved
100%
Resolution Rate

Track This Plugin

Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.

Start Tracking Free

Plugin Details

Version
2.1.6
Last Updated
May 30, 2026
Requires WP
6.5+
Tested Up To
7.0.2
PHP Version
8.0 or higher
Author
landwire

Support & Rating

Rating
★ ★ ★ ★ ★ 5
Reviews
13
Support Threads
1
Resolved
100%

Keywords

Upgrade to Pro

Unlock keyword rankings, search positions, and detailed analytics with a Pro subscription.

Upgrade Now

Frequently Asked Questions

Common questions about Block Logic – Full Block Display Control

!is_page('about') -- everywhere except this specific WP page
current_user_can('administrator') -- admin-only blocks strpos($_SERVER['HTTP_REFERER'], "google.com") !== false -- blocks to show when clicked through from Google
in_array(77, get_post_ancestors($post)) -- WP page that is a child of page 77
WordPress Post & Term Checks has_term('special-offer', 'category', $post) -- post has a specific category term get_post_meta(get_the_ID(), 'featured', true) == 'yes' -- check a meta field value get_post_type() == 'product' -- current post type is a WooCommerce product
has_post_thumbnail() -- only posts/pages with a featured image get_the_category() -- fetch post categories (can be used in expressions) get_the_tags() -- fetch post tags WooCommerce-Specific Checks WC()->cart && WC()->cart->get_cart_contents_count() > 0 -- cart has at least one item WC()->cart && WC()->cart->total > 50 -- cart total is more than $50
ACF Checks (Read-only) get_field('featured') == true -- ACF field “featured” is true get_sub_field('discount') > 0 -- ACF subfield “discount” has a value get_row() > 0 -- there are ACF repeater rows get_field_object('product_info')['value'] !== '' -- check ACF field object value PHP Helpers in_array('baked-goods', wp_get_post_categories($post)) -- category array check strpos(get_permalink($post), 'sale') !== false -- check if permalink contains “sale” empty(get_post_meta(get_the_ID(), 'stock', true)) -- post has no stock meta count(WC()->cart->get_cart()) > 1 -- more than 1 item in cart time() > strtotime('2026-01-01') -- check current timestamp number_format(WC()->cart->total, 2) -- format cart total round(get_post_meta(get_the_ID(), 'rating', true)) > 4 -- rating is greater than 4 Supported functions and globals Block Logic comes with a set of safe WordPress, WooCommerce, ACF, and PHP helper functions, as well as selected globals and superglobals. These can be used in block logic expressions to control the display of blocks dynamically. Allowed Superglobals By default, only safe, read-only superglobals are available. Developers can extend this list via the block_logic_allowed_superglobals filter. $_GET -- query parameters $_POST -- submitted form data $_SERVER -- server/environment info (e.g., $_SERVER['HTTP_REFERER']) $_COOKIE -- cookies Example usage: !empty($_GET['ref']) && strpos($_SERVER['HTTP_REFERER'], 'google.com') !== false Allowed WordPress Globals These global variables are accessible inside block logic expressions. Extend the list via the block_logic_allowed_globals filter. $post -- current post object $wp_query -- main query object $wp_the_query -- backup of main query $wp -- WP environment object $wp_rewrite -- rewrite rules $current_user -- WP_User object of the current user $wp_version -- WordPress version Example usage: in_array($post->ID, get_post_ancestors($post)) && is_user_logged_in() Allowed WordPress Functions Overview current_user_can('administrator') -- check user capabilities get_current_user_id() -- current user ID get_option('blogname') -- get site title get_post_meta(get_the_ID(), 'featured', true) -- read post meta get_post_type() -- post type slug get_the_ID() -- current post ID has_post_thumbnail() -- check if post has featured image
Example usage:
ACF Functions Overview get_field('featured') -- read ACF field value get_sub_field('discount') -- read subfield in repeater get_row() -- number of repeater rows get_field_object('product_info')['value'] -- field object value Example usage: get_field('featured') == true && get_sub_field('discount') > 0 WooCommerce Functions Overview wc_get_cart_contents_count() -- number of items in cart wc_get_cart_total() -- cart total wc_get_cart_subtotal() -- cart subtotal wc_cart_is_empty() -- TRUE if cart is empty wc_customer_get_id() -- current customer ID wc_customer_get_billing_email() -- customer billing email wc_customer_get_shipping_country() -- shipping country wc_customer_get_shipping_state() -- shipping state wc_customer_get_shipping_postcode() -- shipping postcode wc_get_product($product_id) -- get WC_Product object Example usage: wc_get_cart_contents_count() > 0 && wc_get_cart_total() > 50 PHP Helpers Overview strpos($haystack, $needle) in_array($needle, $array) empty($var)
count($array) strlen($string) preg_match($pattern, $subject) current_time('timestamp') strtotime($string) date($format, $timestamp) time() number_format($number, $decimals) round($number) Example usage: count(WC()->cart->get_cart()) > 1 && time() > strtotime('2026-01-01') Extending the list of allowed functions Block Logic provides four filters that developers can use to safely extend which functions, globals, and superglobals are available inside block logic expressions. Add custom functions Use the block_logic_allowed_functions filter to make additional functions available in block logic expressions. Example add_filter('block_logic_allowed_functions', function($allowed) { $allowed[] = 'my_cart_has_items'; return $allowed; }); function my_cart_has_items() { return WC()->cart && WC()->cart->get_cart_contents_count() > 0; } Usage in a block logic field: my_cart_has_items() Add extra superglobals Use the block_logic_allowed_superglobals filter to allow additional superglobals like $_SESSION. Example: add_filter('block_logic_allowed_superglobals', function($allowed) { $allowed[] = '_SESSION'; return $allowed; }); Usage in a block logic field: !empty($_SESSION['special_offer']) Add extra WordPress globals Use the block_logic_allowed_globals filter to allow extra global variables. Example: add_filter('block_logic_allowed_globals', function($allowed) { $allowed[] = 'my_global_data'; return $allowed; }); // Somewhere in your theme or plugin $GLOBALS['my_global_data'] = ['foo' => 'bar']; Usage in a block logic field: $post->ID == my_global_data['foo'] Add completely custom globals Use the block_logic_extra_globals filter to allow any additional global variable in block logic expressions. Example: add_filter('block_logic_extra_globals', function($allowed) { $allowed[] = 'my_custom_flag'; return $allowed; }); // Initialize the global somewhere $GLOBALS['my_custom_flag'] = true; Usage in a block logic field: $my_custom_flag && is_user_logged_in()

Sign In / Register

You need to sign in or register to use this feature.