Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1323096
    flacnvinyl
    Participant

    What is the correct way to add hreflang tags?

    #1323097
    flacnvinyl
    Participant
    This reply has been marked as private.
    #1323408
    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in!

    To do that, you can add the code below in your child theme’s functions.php file.

    function my_custom_head_output() {
      ?>
        <link rel="alternate" hreflang="ar-sa" href="http://example.com" />
      <?php
    }
    
    add_action( 'wp_head', 'my_custom_head_output', 99999 );

    You can also add hreflang tag using plugins. To do that please walk-through following blog post:

    How To Add Hreflang Tags in WordPress

    Hope that helps.

    #1324021
    flacnvinyl
    Participant

    It does! So not possible to do through customizer?

    #1324091
    Rupok
    Member

    Hi there,

    Thanks for wriitng back. There is no such option is Customizer but the above suggestion should do the job.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1323096 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>