Title: bmars's Replies | WordPress.org

---

# bmars

  [  ](https://wordpress.org/support/users/bmars/)

 *   [Profile](https://wordpress.org/support/users/bmars/)
 *   [Topics Started](https://wordpress.org/support/users/bmars/topics/)
 *   [Replies Created](https://wordpress.org/support/users/bmars/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/bmars/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/bmars/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/bmars/engagements/)
 *   [Favorites](https://wordpress.org/support/users/bmars/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Polylang] Polylang – switching language on the fly and duplicate URL's](https://wordpress.org/support/topic/polylang-switching-language-on-the-fly-and-duplicate-urls/)
 *  [bmars](https://wordpress.org/support/users/bmars/)
 * (@bmars)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/polylang-switching-language-on-the-fly-and-duplicate-urls/#post-4934204)
 * 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 1 replies (of 1 total)