From 5a0885ae934b035e65c99f7e62afb9bd4c212b92 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Wed, 20 May 2026 16:38:02 +0530 Subject: [PATCH 1/2] fix: remove title-tag support --- inc/Core.php | 1 - 1 file changed, 1 deletion(-) diff --git a/inc/Core.php b/inc/Core.php index 4d635941..dc644b75 100644 --- a/inc/Core.php +++ b/inc/Core.php @@ -71,7 +71,6 @@ public function setup() { add_theme_support( 'starter-content', $starter_content->get() ); add_theme_support( 'wp-block-styles' ); add_theme_support( 'automatic-feed-links' ); - add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'editor-styles' ); add_theme_support( From 53bd7f8923f4eeba00e1cca1a133cc087ac686e8 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Wed, 20 May 2026 17:01:03 +0530 Subject: [PATCH 2/2] fix: add title-tag support for WP < 5.9 --- inc/Core.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inc/Core.php b/inc/Core.php index dc644b75..fdc45a6d 100644 --- a/inc/Core.php +++ b/inc/Core.php @@ -155,6 +155,13 @@ public function setup() { ) ); + // WP < 5.9, wp_head() does NOT auto-output , so we MUST declare title-tag support. + // WP >= 5.9, wp-includes/template-canvas.php calls wp_head() which already handles <title> natively. + // Adding title-tag support on top causes a second <title> injection when Yoast (or any SEO plugin using wp_title filters) is active. + if ( version_compare( $GLOBALS['wp_version'], '5.9', '<' ) ) { + add_theme_support( 'title-tag' ); + } + remove_theme_support( 'core-block-patterns' ); register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'raft' ) ) );