Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

bmars on "Polylang - switching language on the fly and duplicate URL's"

$
0
0

I managed to get duplicate slugs to save, but can't get the above code to work. $wp_query->post_count is always 1, even when there are two pages with the same slug. Is there something I'm doing wrong?

It seems like the best solution would be a query like: WHERE post_name = %s AND language_id = %d. Then slugs wouldn't be ambiguous on the front-end. But I have no idea how to make that kind of change.

Edit: Forgot to say that I'm trying to get this to work for pages, not blog posts.


Viewing all articles
Browse latest Browse all 11471


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>