You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understood wpml_permalink_filter inside class-custom-permalinks-frontend.php
is used to solve language switcher issues, but in my case it is not working. My language setting is: domain/lang-code.
This code:
trailingslashit( home_url() )
returns home page with language, then if translated post has same permalink then wpml_permalink_filter points to current language instead of translated.
For my case temporary fix is this:
replace $trailing_permalink = trailingslashit( home_url() ) . $custom_permalink;
As I understood wpml_permalink_filter inside class-custom-permalinks-frontend.php
is used to solve language switcher issues, but in my case it is not working. My language setting is: domain/lang-code.
This code:
trailingslashit( home_url() )
returns home page with language, then if translated post has same permalink then wpml_permalink_filter points to current language instead of translated.
For my case temporary fix is this:
replace
$trailing_permalink = trailingslashit( home_url() ) . $custom_permalink;
with:
but probably it is not correct for all cases
The text was updated successfully, but these errors were encountered: