• Is there a way to not output hreflang tag when translation is missing in language switcher link?

    I sometimes want to display all available languages and have homepage as fallback if no translation. But I don’t want a hreflang tag on that one in the language switcher as it’s not a translation of that page just the French version of the site.

    Is it possible to not output hreflang tag on the language switcher when no translation is available for that language? As we print class “no-translation” it is defined and known so is there a way to do it with the actions and filters? I could not find any that would do that. Only not output any page or link if the translation isn’t available.

  • The topic ‘Polylang language switcher hreflang output when no translation’ is closed to new replies.