Support » Plugin: Custom Post Type UI » Custom Taxonomy Slug Error

  • Resolved Christian


    Hi, quick and hopefully simple problem that I couldn’t find by searching through the forums. (I also originally posted this in main forum, but then I thought it might be a plugin-specific problem)

    I have a travel site, and using this Custom Post Type UI Plugin, I created two new custom post types: “Destinations” and “Listings.” For “Listings,” I have added 2 new taxonomies, “Locations” and “Listing Types.”

    To populate each of these new taxonomies with all the terms, I used the Bulkpress plugin. It seemed to work fine, but I am unhappy with some of the tags that was given to several of the new taxonomy terms.

    For example, “Locations” is a hierarchical taxonomy; continents/regions are the parent terms, and individual countries are the child terms. Most terms have slugs just like I want them (lowercase and with hyphens, if two words), but some, like “Egypt,” has a slug like “egypt-africa-2.” It also won’t let me edit the slug.

    I was thinking that perhaps it is because I already have a TAG for “egypt,” but then I have “Australia” and that works just fine. Does anyone know what I can do to fox this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Beckwith


    Hi dauntlessjaunter, I can confidently say that this isn’t an issue with the plugin itself, but more how WordPress handles terms in the database. The term slugs can’t be the same and be treated separately. They need to be unique to be separate. WordPress tries to handle that at times by appending a number at the end, -1,-2,etc. Same thing happens with post slugs. One thing that has confused people is that tags in the trash can still affect slugs because they’re not fully deleted out of the database yet.

    Hope that helps a bit and points you to a solution.



    Michael, thanks so much for your response! But just to be clear, my new custom tax “Locations” should be able to handle a term “Egypt” with a slug “egypt,” even when I have other taxonomies, such as a tag, that also have a slug called “egypt?” Because this seems to be the case with other terms that are in multiple taxonomies, such as “australia,” which exists in both tags and my new “Locations.”

    Also, I wanted to check to see if there were terms that are awaiting a more permanent deletion in my trash. However, I do not see a trash bin for terms I delete, do you think I need to go into PHP MyAdmin to delete these terms from the table?

    One last thing, you mentioned that WP adds the “-2”, “-3”, etc when there are duplicate terms; the strange thing with my “egypt” term in the example was that it not only added the “-2” but it also added the parent term, so that it looked like this: “egypt-africa-2”. Most other terms looked fine, for example, Germany was “germany” while being under Europe parent term, not “germany-europe” and such.

    Sorry for the long explanation, and I really appreciate your help!

    Plugin Author Michael Beckwith


    I believe the terms are still stored all in the same database table, despite being part of different taxonomies. So you’ll probably still run into issues there.

    Regarding trash bins, I think the terms may just be listed but with “0 posts” if you’ve deleted those, then that should remove from the db. I’d have to confirm some stuff otherwise for this part.

    Not sure on the last part either. Sorry.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Taxonomy Slug Error’ is closed to new replies.