I am working on a store locating Wordpress template where I have 5 categories for services. In each category I have 500 cities. I have rewritten my url from:




So for example I have in 3 categories the city London, but now Wordpress sees it as double posts and set the url post slug to /post-2


etc. etc.

My question is: Is there a way to rewrite the url without the -2 etc. behind it and Wordpress still sees the posts as different post, so distinguish by term?

  • It looks like you're misusing taxonomies and post types. If you've created a post type called filter you need to reconsider wether you should actually have created a custom taxonomy called filter instead.
    – Tom J Nowell
    Commented Mar 20, 2014 at 14:02
  • I recommend you instead setup 2 taxonomies, location, and type, and ask how you would create a URL such as: /filter/type/location This would also give you URLs and archives for type only, and location only listings. Also what if a store is located in more than one category? Also your URL schema now has multiple URLs, which should it pick? How would that be cached? How will you explain Google penalising you for content duplication?
    – Tom J Nowell
    Commented Mar 20, 2014 at 14:05
  • @kraftner Thanks for sharing the post, the article advices it against.
    – Robbert
    Commented Mar 20, 2014 at 14:07
  • @TomJNowell Thanks for your answer! /filter is just a name that we have chosen. I use /filter to show categories on, /filter/kundalini-yoga to show cities (as posts) and on the city posts is show posts from my post type 'companies' with the Posts 2 Posts wordpress.org/plugins/posts-to-posts plugin. So it is not a normal Wordpress setting. Also it is not duplicated content for Google because /kundalini-yoga/london and /bikram-yoga/london are certainly different url's
    – Robbert
    Commented Mar 20, 2014 at 14:17
  • it's not the URLs that google sees as duplicates, it's the content on those pages. You don't want to have posts that can have lots of different URLs
    – Tom J Nowell
    Commented Mar 20, 2014 at 14:18