diff --git a/src/wp-includes/theme-templates.php b/src/wp-includes/theme-templates.php index 5cce35cd994ce..4ae6671586178 100644 --- a/src/wp-includes/theme-templates.php +++ b/src/wp-includes/theme-templates.php @@ -76,10 +76,16 @@ function wp_filter_wp_template_unique_post_slug( $override_slug, $slug, $post_ID */ function the_block_template_skip_link() { - // Early exit if not an FSE theme. + // Early exit if not a block theme. if ( ! current_theme_supports( 'block-templates' ) ) { return; } + + // Early exit if not a block template. + global $_wp_current_template_content; + if ( ! $_wp_current_template_content ) { + return; + } ?>