get the term list with postcount based output.
-
<?php if ( get_the_term_list( get_the_ID(), 'category1', true) || get_the_term_list( get_the_ID(), 'category2', true )) { ?> <?php echo get_the_term_list( get_the_ID(), 'category1', "", "", "" ) ?> <?php echo get_the_term_list( get_the_ID(), 'category2', "", "", "" ) ?> <?php } ?>
This code basicly checks both categories if they got something to show and if they do (any of them) , it loads which ever has the info.
Now i want to create another condition which does this
<?php if ( $postcount = 1 ) { ?> and <?php if ( $postcount > 1 ) { ?>But i couldnt seem to manage it. It doesnt have to have postcount code in it. I just want to filter the output based on the quantity of it.
I would apriciate any help.
Thanks.
- The topic ‘get the term list with postcount based output.’ is closed to new replies.