Hierarchical Custom Taxonomies and Conditionals
-
I have created a hierarchical custom taxonomy ‘page_category’ (similar to post category) through my functions.php and would like to use conditional if-statements to display different images in my header.
My problem is however, that I don’t know how to access these new taxonomies. Apparently in_category() only works with the standard post category, I would probably need a new function like in_page_category(). How do I write this?
A very similar problem has been discussed in this topic I believe though, that has_tags() will not be of help with my hierarchical taxonomies.
Any help is greatly appreciated!
// pointers on custom taxonomies from Justin Tadlock
A refresher on custom taxonomies
Custom Taxonomies in WP 2.8
- The topic ‘Hierarchical Custom Taxonomies and Conditionals’ is closed to new replies.