Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion inc/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Comment thread
girishpanchal30 marked this conversation as resolved.
add_theme_support(
Expand Down Expand Up @@ -156,6 +155,13 @@ public function setup() {
)
);

// WP < 5.9, wp_head() does NOT auto-output <title>, 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' ) ) );
Expand Down
Loading