I’m working on a site which needs to have pages and posts sorted into the same categories. The pages have their own individual hierarchy structure.
Is there a way to do this using a custom taxonomy?
I’m working on a site which needs to have pages and posts sorted into the same categories. The pages have their own individual hierarchy structure.
Is there a way to do this using a custom taxonomy?
You must be logged in to post a comment.
Yes, a custom taxonomy is the best way to achieve this.
For a cat breeder site Iâve set a taxonomy for colors (in german: Farbe):
Note the third parameter
array( 'post', 'page' )
.Now you can find all posts and page covering the color black at /farbe/black/.
Thatâs all, WP will do the rest for you. 🙂
Update
WordPress will search for a matching template.
To link to this taxonomy, add the following code to the meta data box (tags, categories, date etc.) of your posts:
Output:
Screenshot for taxonomy âFarbeâ in the post edit screen: