diff --git a/source/wp-content/themes/wporg-developer-2023/inc/search.php b/source/wp-content/themes/wporg-developer-2023/inc/search.php index 57358680b..51bcc1d0d 100644 --- a/source/wp-content/themes/wporg-developer-2023/inc/search.php +++ b/source/wp-content/themes/wporg-developer-2023/inc/search.php @@ -227,6 +227,11 @@ public static function parse_search_order( $q ) { public static function redirect_empty_search( $posts, $query ) { $redirect = ''; + // Skip when in admin context. + if ( is_admin() ) { + return $posts; + } + // If request is an empty search. if ( $query->is_main_query() && $query->is_search() && ! trim( get_search_query() ) ) { // If search is filtered.