Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #297080

    Hilal A
    Participant

    Hello
    I have an Arabic website haloinsight.com
    I noticed google recommends adding hreflang to improve SEO

    how can I implement this in the theme?

    I want it to target this langauge ar-sa

    I am using a childtheme

    regards
    hilal

    #297737

    Paul R
    Moderator

    Hi Hilal,

    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://haloinsight.com" />
      <?php
    }
    
    add_action( 'wp_head', 'my_custom_head_output', 99999 );
    

    Hope that helps.

    #680364

    indiavidual
    Participant

    hi there,

    i have applied the hreflang=”en” to my child theme functions.php file. when i check the search console it still says that my site has no hreflang tags. does search console take time till it updates?

    and to what exactly does the “99999” refer to in the code?

    thanks for your support!

    #680431

    Zeshan
    Member

    Hi @indiavidual,

    Thanks for writing in! To assist you with this, we’ll first need you to provide us with your URL as stated on the forum entrance page. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you.

    In regard to ‘99999’ from the code, this is the priority of the filter. You can find more about it in WordPress add_filter() function reference.

    Thanks!

    #681150

    indiavidual
    Participant
    This reply has been marked as private.
    #681244

    Jack
    Keymaster

    Hi there,

    Thanks for writing back, I’ve tried to login, but I get an invalid password error, could you double check the provided details please?

    Also if you could supply FTP details in addition to the WP login details.

    Thank you!

    #686312

    indiavidual
    Participant
    This reply has been marked as private.
    #686910

    Jade
    Moderator

    Hi there,

    Thanks for the details.

    I have tried to login to your admin section but the password still isn’t working. Kindly check it again. Also, would you mind temporarily switching the language of your admin section to English so that it would be easier for us to check?

    As for the FTP details, please provide us with the host name.

    Cornerstone 1.0.9 was just released which should address the issue you have mentioned. Kindly do an update to the latest version.

    Let us know how it goes.

    #687638

    indiavidual
    Participant

    cornerstone now works with the new update to 1.0.9 thanks

    my admin section and the whole site setup is in English (US). not sure what site you are getting.

    also did i change the PW for it again. will send a private message with it + the host name

    thanks

    #687693

    indiavidual
    Participant
    This reply has been marked as private.
    #687698

    indiavidual
    Participant

    fyi i just checked with “search console” and the hreflang tags are showing. i guess it took some time for google. thanks for your support!

    #687871

    Paul R
    Moderator

    You’re welcome! 🙂