Redirect to ‘/es/el_post’ when go to ‘/post’
-
Hi everyone.
The scope: WP 6, Polylang (8 languages), Hello Elementor Theme, Elementor Pro page builder. Single Post Pages are made with Elementor Templates.
For example, I have same post on different languages. The EN name of this post is “Post”, the ES name of this post is “El Post”.
What do I need: user’s default (browser) language is ES (for example). I want this user to be redirected to example.com/es/el_post when he is trying to reach example.com/post.
What’s happening now: when ES user is trying to reach example.com/post he is redirected to example.com/en/post instead of example.com/es/el_post. By the way, if user is trying to reach example.com/el_post, he is redirected to example.com/es/el_post.
So, the redirection rules must be based on client browser’s language, not on slug.
Maybe some code to add to functions.php? Or something else?
Thank you in advance.
- The topic ‘Redirect to ‘/es/el_post’ when go to ‘/post’’ is closed to new replies.