Something odd seems to be happening, and let me illustrate this step by step. I have a custom post type actors, where I’ve added a custom taxonomy (as tags) called “movies”. This is basically a list of movies that belong to a specific actor. Now, what I’m doing is matching the taxonomy’s slug with the “movie post type” slug to find matches. The problem is that for example, sometimes I will add a tag like “to the wonder” which is a movie post in the backend, but the slug for that term taxonomy when I use get_the_terms and output what it gives will be to-the-wonder-2 , which doesn’t match with the movie’s slug (to-the-wonder) and thus fails the lookup. Can you explain why it’s randomly deciding to add -2 to my tag? It’s only doing this for some tags, not all … why does the slug have -2 in it? Is it because there’s already a taxonomy with that name elsewhere, and if so, how do i track it down?
- The topic ‘Custom Taxonomy slug randomly adding -2 to the end?’ is closed to new replies.