Print some text using $term_id

In my case CPT = event & Taxonomy = et-category & categories are green,red,black etc.

How to print different text for diffrent categories?

I am using this if & else statement inside wp_query.

if ($term_id = 10){
echo ‘black’;
else if ($term_id = 11){
echo ‘red’;
else if ($term_id = 12){
echo ‘green’;
//and so on …………..

Read more here:: Print some text using $term_id

Leave a Reply

Your email address will not be published. Required fields are marked *