From a4d5b009c6b44ec6fd33756fde7c8756e4ad9167 Mon Sep 17 00:00:00 2001 From: Michal Czaplinski Date: Wed, 27 Nov 2024 18:41:22 +0000 Subject: [PATCH] Add the `is_admin()` checks --- lib/experimental/blocks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/experimental/blocks.php b/lib/experimental/blocks.php index c87e033a9ce3c2..222452ead1e927 100644 --- a/lib/experimental/blocks.php +++ b/lib/experimental/blocks.php @@ -154,7 +154,7 @@ function gutenberg_block_core_query_add_url_filtering( $query, $block ) { function gutenberg_block_core_query_add_search_query_filtering( $query ) { // if the query is not the main query, return - if ( ! $query->is_main_query() ) { + if ( $query->is_admin() || ! $query->is_main_query() ) { return; }