0

I have a books custom post type, I want to do something only on the 'book_categories' pages and other stuff on the 'book_year' pages.

How do I check if I'm on those taxonomy pages?

2

Use is_tax():

if ( is_tax( 'book_categories' ) ) {

}

if ( is_tax( 'book_year' ) ) {

}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.