In my taxonomy pages within my template I list the (custom)posts of a particular taxonomy. Where the titles of these are listed I want to bring in the value of another taxonomy for certain posts(products) that are discontinued. However if it remains in production I want it to just have the title. The code I am using is:
<?php $terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'new-or-old', '', ', ', '' ) ); echo $terms_as_text; ?>
But this obviously shows the alternative taxonomies as well as discontinued. Can anyone help me with my novice PHP to structure some kind of ' if new-or-old = discontinued then print else don't print' code?