• I have a problem with my Logout links from nav menu caused by Polyland sticking a language code into each logout attempt.

    I have a loginlogout menu option through ActiveMember360. When someone logs in there’s no issue, if their viewing in English it takes them to the English login page, if in Welsh they go to the Welsh login page.

    The problem is with logouts. As the logout page is a WP process, there’s only one version of that page (i.e. it’s a page in name only, nobody ever sees it). So when they’re in English mode and someone clicks logout it’s all fine, it goes to /logout&nonce etc. But if they’re in the Welsh verison then Polylang tries to stick the cy in there, meaning I get cy/logout&nonce which is a non-existant page.

    Is there any way I can tell Polylang to ignore that one link without having to change the settings and remove the language code from all of my pages?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    Hi,

    You can do this in PHP. Hook to the filter ‘_get_page_link’ filter with a priority > 20 and remove the language code added by Polylang.

    Thread Starter mrgutoa

    (@mrgutoa)

    Hi Chouby, thanks for replying, it’s great to know there’s a way around this. Now I’ll just go google how to Hook to a filter and set priority and remove language code from that page ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Polylang Breaks Logout’ is closed to new replies.