diff --git a/wp-includes/block-template.php b/wp-includes/block-template.php index 7bd5684ed2..4d3a0449ea 100644 --- a/wp-includes/block-template.php +++ b/wp-includes/block-template.php @@ -312,6 +312,10 @@ function _block_template_render_without_post_block_context( $context ) { * @param WP_Query $wp_query Current WP_Query instance, passed by reference. */ function _resolve_template_for_new_post( $wp_query ) { + if ( ! $wp_query->is_main_query() ) { + return; + } + remove_filter( 'pre_get_posts', '_resolve_template_for_new_post' ); // Pages. diff --git a/wp-includes/version.php b/wp-includes/version.php index c9703fbf36..32d63d4de3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0.1-alpha-53590'; +$wp_version = '6.0.1-alpha-53594'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.