So, i installed Polylang and the problem I am facing is related to the post preview function on my WordPress website. When I preview a post on different language than default, it takes me to a 404 error page unless I manually change the domain from the current one to the ".cz" domain. (I'm using different TLD for every language). I want to find a solution that will allow the post preview function to work properly with the Polylang plugin with every language.
All updates are installed, everything is up to date.
Thank you!
So, i installed Polylang and the problem I am facing is related to the post preview function on my WordPress website. When I preview a post on different language than default, it takes me to a 404 error page unless I manually change the domain from the current one to the ".cz" domain. (I'm using different TLD for every language). I want to find a solution that will allow the post preview function to work properly with the Polylang plugin with every language.
All updates are installed, everything is up to date.
Thank you!
I know that i'm 2 late, but i had the same problem. I rewrote the urls to ignore polylang functionality like this:
if ( (isset($_GET['page_id'])) || (isset($_GET['preview']) && $_GET['preview'] === 'true') ) {
$query->query_vars['pagename'] = '';
}
The problem is that the polylang adds /{new-language}/ to the url, but WP treats it as a page. This function ignores this and essentially solves the problem