I need to display the number of categories which I can do with this...
<?php echo $num_cats = wp_count_terms('category'); ?>
...but I only want it to count categories that have at least one post.
Thanks in advance.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community