I got the language switcher resolving url’s correctly with it:
// Add the custom language link to polylang language switcher.
add_filter('pll_the_language_link', function ($url, $slug, $locale) {
global $wp_query;
if (isset($wp_query->query_vars['intranet-login'])) {
$url = home_url($slug . '/intranet-login');
return $url;
}
return $url;
}, 10, 3);
But i still wonder, what is the proper way to make Polylang aware of custom endpoints, if it has one…
Regards,
-
This reply was modified 6 months, 1 week ago by Alexsoluweb.
-
This reply was modified 6 months, 1 week ago by Alexsoluweb.
-
This reply was modified 6 months, 1 week ago by Alexsoluweb.
-
This reply was modified 6 months, 1 week ago by Alexsoluweb.
-
This reply was modified 6 months, 1 week ago by Alexsoluweb.