• Resolved kashifpkteam

    (@kashifpkteam)


    This is my website link. I have lot of hreflang tag issues on href as well as on screaming frong.
    My current lang tags are this
    <link rel=”alternate” hreflang=”de” href=”https://www.dentaly.org/de/” title=”de_DE” /><link rel=”alternate” hreflang=”en” href=”https://www.dentaly.org/en/” title=”en_GB” /><link rel=”alternate” hreflang=”en_us” href=”https://www.dentaly.org/us/” title=”en_US” /><link rel=”alternate” hreflang=”es” href=”https://www.dentaly.org/es/” title=”es_ES” /><link rel=”alternate” hreflang=”x-default” href=”https://www.dentaly.org/” title=”fr_FR” />

    Gentrated through this code in fucntions.php

    function gpc_msls_head_hreflang($language)
    {
    if ($language == ‘fr’) {
    $language = ‘fr’;
    }

    if ($language == 'de') {
        $language = 'de';
    }
    
    if ($language == 'en_US') {
        $language = 'en_us';
    }
    
    if ($language == 'en-gb') {
        $language = 'en';
    }
    
    if ($language == 'es-es') {
        $language = 'es';
    }
    
    // Set the 'x-default' for the French version
    if ($language == 'fr') {
        $language = 'x-default';
    }
    
    return $language;

    }

    add_filter(‘msls_head_hreflang’, ‘gpc_msls_head_hreflang’);

    But i need correct format. can you please let me know how we can modify the current tags.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.