Custom taxonomy if statement

Question

I have a custom taxonomy job-time with categories such as part-time and full-time, what I’m trying to do is a simple IF statement where if the Job Time is Part Time it displays a message and IF it’s Full Time, it displays something else.

I’ve been looking into this and found this code;

<?php if ( is_tax( 'job-time', 'part-time' ) ) {?>
    Yes
<?php } elseif ( is_tax( 'job-time','full-time' ) ) {?>
    No
<?php } ?>

However nothing outputs and not sure why?

Can anyone help please?

0
Sam 4 months 0 Answers 39 views 0

Leave an answer