0

I'm organizing some custom post types by taxonomy so that my URLs would look like

/small-groups/spring-2015/date-your-mate
/small-groups/fall-2015/date-your-mate

The spring-2015 and fall-2015 are the slugs of my custom taxonomy.

However, when Wordpress generates the permalinks for the 2nd "Date Your Mate" it comes back with (notice the -2)

/small-groups/fall-2015/date-your-mate-2

Is there an option that I can use to turn that off so that the system queries with in the taxonomy and not need any sequential suffix (the -2 part)?

I'm guessing that this can be changed by hooking into the wp_unique_post_slug filter, but I'm not sure how

0

I don't know if you can use pages for your purpose, but as in the comments in wp-includes/post.php line 3701 (in the wp_unique_post_slug function), you can use identical slugs for pages in different trees:

/*
 * Page slugs must be unique within their own trees. Pages are in a separate
 * namespace than posts so page slugs are allowed to overlap post slugs.
 */

There seems to have been a plugin for what you want a few years ago, but it has disappeared since.

Right now I don't see a way to do it without getting at the core code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.