WordPress.org

Ready to get started?Download WordPress

Forums

Permalink forcing "-2" after post type name (2 posts)

  1. JsonB123
    Member
    Posted 3 years ago #

    I have a few different custom post types on a site I'm building. Some of these 'entities' share a name. I have, for example, a car name "viper" and a snake type "viper". These are using completely different rewrites to get completely different URLs, repsectively:

    - viper (car) is: http://mysite.com/cars/viper
    - viper (snake) is: http://mysite.com/snakes/viper

    My issue is that on the post type that I create after the first, that shares a name, a -2 is getting appended, e.g:
    viper (snake) is getting: http://mysite.com/snakes/viper-2

    Is there a way to change this? These shouldn't conflict since the URLs are completely different and it would only make sense if there were two snakes named "viper" with a permalink of "viper".

  2. JsonB123
    Member
    Posted 3 years ago #

    Also, just to be clear, the rewrite argument for each is different. I could explain this away if they were the same but this is what I have:

    'rewrite' => array('slug' => 'cars', 'with_front' => false)

    and

    'rewrite' => array('slug' => 'snakes', 'with_front' => false)

Topic Closed

This topic has been closed to new replies.

About this Topic