Multiple title tag in block theme
-
Hi. We are creating a new block theme for a client, but WordPress and Yoast are both producing the exact same title meta tag on every page. I believe this is due to WordPress changing they way they display title tags and removing the conditional title tag rendering and instead making it unconditional. You can see this in their wp-includes/block-template.php where they add the action “_block_template_render_title_tag”.
We’ve checked back on a few sites using block themes and this is the case on all of them.
As wordpress are forcing this into the <head> of the page, is there any way you can make your code check if _block_template_render_title_tag exists and then not show your title tag? I’m assuming this is more possible than getting wordPress to change their methodology as they changed this when they introduced block themes.
Sorry if I have rambled on a bit, but we’ve had an SEO company flag this as a big issue so need to do something other than using jQuery to remove the second title tag.
The page I need help with: [log in to see the link]
- The topic ‘Multiple title tag in block theme’ is closed to new replies.