Hi there,
thanks for the code!!! Well, the creation and upload/install was successful, but I could not make it work.
(As I’m not an IT expert, but) I assume the “do_not_translate_path” lines (you inserted three, “contact/home/test-page”) means that the URLs can be listed line by line, so as many as needed can be added, replacing “contact” and/or “home” etc. with the ones to be non-translated, right(?).
I tried first with only one, a “main log out button link” (top right in our nav menu)
both main and “en” folder that TP adds to the URL (first one by one)
https://www.navita.hu/my-account/customer-logout/?customer-logout=true
https://www.navita.hu/en/my-account/customer-logout/?customer-logout=true/
along with the built-in Woocommerce link (which I cannot alter manually):
https://www.navita.hu/my-account/customer-logout/?_wpnonce=b932cbac16
https://www.navita.hu/en/my-account/customer-logout/?_wpnonce=b932cbac16
PS: it was a bit confusing to me as well, as you mention “page” to exclude, however, these are “only” direct links for logout (not literal pages, aren’t they).
I guess the code number after ?_wpnonce= (in bold) refers to the user itself, so if it is true, in this case, it is useless to have it in a link, as all the users will have different “code numbers”; correct me if I’m wrong, as I’m not that good at .PHP, but when I logged in with a “testuser” /customer/ account, the logout link is different (just to show you the example):
https://www.navita.hu/en/my-account/customer-logout/?_wpnonce=91c1c09207
As I mentioned, I tried these (4) lines one by one in the .php, and all at once with no luck (and the Woocommerce link is always changing, anyway, depending on the logged-in user). AND I cannot alter that logout link, as it’s Woocommerce’s built-in logout link.
If it was only with the admins that would be OK, but “regular” users cannot log out, either. I thought WPS Hide login plugin only redirects admins to the WP backend (altered) login page after logging out, but in this case, it inserts the “hidden” path (geekay) into the URL, which returns with 404.
So, briefly, I don’t know what to do. Worst case, we have to eliminate WPS Hide login, which we do not want.
The file now has all the 4 lines, tested first one by one, then all together, no success.
screenshot:
https://ibb.co/QDYCKWd
One more comment, weirdly enough, I cannot even log out if WPS hide login is active from WP itself when 2nd language (EN) is set.
screencast video:
https://drive.google.com/file/d/1AcW-yQsvujUPOY5o70Soy5Z5c4KpRY1N/view?usp=sharing
– at 0:07 just wanted to show you the “simple” logout link, and then tried to log out via WP logout link.
Any idea?
Thanks in advance
Regards
Gabe