Blockbase: Duplicate Title tag on all blockbase & blockbase-premium themes
Quick summary
Any new site created has duplicate <title> tags, regardless of plan. Only happens on child themes of blockbase or blockbase-premium.
Steps to reproduce
- Create a new Simple site (Free or Pro Plan)
- Pick any theme (Free or Premium)
- Check the page source. You will see two
<title>tags.
What you expected to happen
I would expect the <title> to be shown once in the page source code - as showing twice could have an impact on SEO.
What actually happened
The <title> is shown twice, which does not happen with themes like Hever or Twenty-TwentyTwo.
Context
User is worried about SEO impact. 4848257-zen
Simple, Atomic or both?
Both
Theme-specific issue?
Any themes that are children of blockbase or blockbase-premium
Thanks @rachelwinspear! This issue has been triaged as I was able to reproduce this on an Atomic test site with the Premium theme: Baxter. I was also able to reproduce this on an Atomic site with the free New Themes: Attar, Hari, Marl, Winkel, and Dorna
I think creating a child theme to customize header.php as suggested in the ticket is not possible for Block themes. Block themes do not have PHP files.
@kimerlin81 Are there any other workarounds at the moment?
Asking here: p1646979508429909-slack-C029FM1EH
@Robertght the link appears to be incorrect.
The issue was still present when a different SEO plugin was active. Updated the linked thread (it's working ok here, @devNigel!) and asked the customer to confirm the name and version number to help testing.
Customer came back with the following information:
Rank Math, and I forgot the other one I tested, but both of them gave the same issue.
@Automattic/serenity is this something that can be added to your board (as per p1647611540333819/1646979508.429909-slack-C029FM1EH)?
I am able to replicate this issue on a self-hosted ( TasteWP instance ) with Blockbase theme. So it looks like the issue is rooted in Blockbase
Should we change the priority to high, since this will affect SEO of a very large number of websites?
I compared the functions.php of TwentyTwentyTwo with that of Blockbase.
I see that Blockbase seems to have a line with the template tag add_theme_support( 'title-tag' );
From what I read, this line is redundant in block themes, since Gutenberg has this built-in feature of adding the title tag. ( I found this link via this forum discussion search result.
There may be some other reason why we still have add_theme_support( 'title-tag' ); added on Blockbase, which needs to be discussed with the theme team. If there is none, then that line should be removed.
I confirm the following
- The issue of duplicate tags gets introduced in TwentyTwentyTwo theme if we add the line discussed above.
- the issue goes away from Blockbase if we remove / comment off the line.
Workaround - I tested this code snippet, that seems to do the job for now ( designed to work only with Blockbase child themes )
function blockbase_remove_duplicate_title_tag_nrmn () {
if ( ! wp_is_block_theme() ) {
return;
}
remove_theme_support( 'title-tag' );
}
add_action( 'after_setup_theme', 'blockbase_remove_duplicate_title_tag_nrmn', 10 );
The title-tag support was added here. It probably needed it back then and core caught up with that and now it's redundant. I vote to remove.
I've just been testing Blockbase with and without the title-tag support and I saw no differences - the title tag still rendered correctly either way. I also tested with Yoast and I can see that removing the title-tag support fixes the duplication issue, so I think removing this sounds good to me too.
Delayed reaction, but yes, Serenity can pull this in on our next sprint. 😄
Just wanted to add that this issue popped up on another blockbase child theme "Russel" here: 5164173-zd-woothemes
I provided @nagpai 's code snippet above as a temporary workaround which seemed to remove the duplicate <title> tag.
Worth mentioning that I'm seeing duplicate title tags even without Yoast.
I also see it on a Simple site with the Pro Plan and I see it on a Simple Free site. Doesn't seem to matter which theme.

I'm also still seeing the duplicate title tags even with add_theme_support( 'title-tag' ); commented out 🤔