• Hello,

    Firstly, I want to express my gratitude for your incredible Multisite Language Switcher plugin. It has greatly simplified managing different language versions of my WordPress site. Its simplicity and efficiency are truly outstanding.

    However, I need your help with a specific issue related to the use of hreflang tags:

    Currently, the hreflang tag “en” is properly applied for the English version of my site.
    However, I wish to be able to specify additional regional language versions, specifically:
    “en-GB” for the United Kingdom
    “en-US” for the United States
    My questions are the following:

    Is it possible to add these additional hreflang tags with Multisite Language Switcher?
    If yes, could you guide me on how to proceed?
    I thank you in advance for your help and look forward to your response.

    Best regards,

    Mark

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dennis Ploetner

    (@realloc)

    Hello Mark,

    it is possible to adjust this with code. There is a filter that will be called short before the output of those links:
    $arr = (array) apply_filters( 'mlsl_output_get_alternate_links_arr', $arr );

    Hope this helps!

    Thread Starter jagmaragenceweb

    (@jagmaragenceweb)

    Hello everyone,

    Just a quick “bump” on my question regarding the addition of specific regional hreflang tags (“en-GB” for the United Kingdom and “en-US” for the United States) with the Multisite Language Switcher plugin.

    If anyone has any insights on this, I would greatly appreciate your help. Thank you!

    Best regards,
    Mark

    Thread Starter jagmaragenceweb

    (@jagmaragenceweb)

    My goodness, I apologize for the confusion. It’s such a coincidence. I was in the process of adding a supplementary message when another response came through. I sincerely regret any confusion caused.

    Thank you very much for your reply. I’ll test your solution immediately. Does the filter that was sent need to be positioned in a specific location within the function.php file?

    Thanks once again!

    Plugin Author Dennis Ploetner

    (@realloc)

    Did you see my answer short before your second message? ?? Does this help you or do you need assistance with the callback code?

    Plugin Author Dennis Ploetner

    (@realloc)

    The code can be placed anywhere in the function.php file. It will get an array and should return this array. The values can be modified as you like.

    Thread Starter jagmaragenceweb

    (@jagmaragenceweb)

    Yes, I saw the last message, sorry. It arrived exactly when I was writing mine. ??

    Indeed, I could really use a little help in implementing such a function, if it’s not too much to ask of course. ?? I’m having trouble seeing how I could interfere with all languages at the same time.

    Otherwise, I’ll try to tinker something myself.

    Thanks! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding Additional hreflang Tags with Multisite Language Switcher’ is closed to new replies.