• Resolved xeon2

    (@xeon2)


    Hello

    I discover that I have duplicate title for yoast seo v15.5, here’s my code under header.php

    <head>
        <title><?php wp_title(); ?></title>
        <meta charset="<?php bloginfo( 'charset' ); ?>" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <?php wp_head(); ?>
    </head>

    But for v12.0, there’s no title duplication with the same setup? Here’s the html output.

    
        <title>Yet Another Blog</title>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        
        <!-- This site is optimized with the Yoast SEO plugin v15.5 - https://yoast.com/wordpress/plugins/seo/ -->
        <title>Yet Another Blog</title>
    

    I tested with new wp install, tweak the header.php and found exact the same issue. Is this intended behaviour? What’s the best way for me to resolve this?

    Thank you

    • This topic was modified 4 years, 2 months ago by xeon2.
    • This topic was modified 4 years, 2 months ago by xeon2.
Viewing 4 replies - 1 through 4 (of 4 total)
  • @xeon2

    This issue occurs when the theme has no support for the WordPress title hook or avoiding the title hook add_theme_support( 'title-tag' ); and as such, both Yoast SEO and theme outputs multiple title tags. Therefore, you’ll need to reach out to the theme support and ask them to disable the theme title output and that shall fix the issue for you.

    Thread Starter xeon2

    (@xeon2)

    Thanks for reply.

    Is there reason for why it is working previously and not with the latest update?

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    We are afraid to say that we are not quite exactly sure why the same code worked before but not anymore after updating to the latest version of the Yoast SEO plugin. However, we do know that using the wp_title() in the </title> isn’t the best practice anymore and it is recommended to use the add_theme_support('title-tag'); instead which should fix the issue for you.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Duplicate title’ is closed to new replies.