From 45525b391d394a2d41cf1ec841a1cf237d453737 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Fri, 4 Jun 2021 10:56:45 +0300 Subject: [PATCH] fix conditionally adding skipLink --- lib/full-site-editing/templates.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/full-site-editing/templates.php b/lib/full-site-editing/templates.php index 13e9885eafd0d..418b534a3eaf6 100644 --- a/lib/full-site-editing/templates.php +++ b/lib/full-site-editing/templates.php @@ -188,10 +188,16 @@ function gutenberg_the_skip_link() { return; } - // Early exit if not an FSE theme. + // Early exit if not a block theme. if ( ! gutenberg_supports_block_templates() ) { return; } + + // Early exit if not a block template. + global $_wp_current_template_content; + if ( ! $_wp_current_template_content ) { + return; + } ?>