I've been learning about taxonomies, custom posts etc though a lot of trial and error. I finally have it working how I want, however now I am getting some conflict with my desired slugs. I can't name my category "venue" because someplace in the database, that's already taken (I assume) - even though I've deleted the category that used it. Now when I try adding the category that I want to use the "venue" slug, WP automatically makes it "venue-2", which I definitely don't want in my url as the folder. Any suggestions for this?
This can also be caused by uploading images with the same file name as the post/page. In my case, I uploaded an image called 'careers.jpg' before I created a page called 'Careers', so the page was getting the '-2' appended. To fix it, I just changed the slug on the image, then I was able to change the slug on the page.
There is another cause for Wordpress appending
-2 at the end: When the slug only contains numbers. This is not allowed.
Example: I wanted to name my page
2016 and even though there has never been a 2016 in the database the slug always turned into
As far as I remember this is because numbers have a special meaning for workpress (path variables) and they couldn't be distinguished.
So my solution was to manually rename the slug to
year-2016 which looks nicer than this "-2" suffix.
Usually when Wordpress appends the "-2" to a slug, that means you still have the old content, that you meant to delete, in the trash. Be sure to empty your wordpress trash, then try making the slug.
To access the pages in the trash, open the Pages / All pages menu, then click on the "Bin" section that appears on the right hand side of the "All" section. Note that if there is no items in the bin, this section will not appear.