Only Show Categories with Posts

[ad_1]

On a page, I call a taxonomy pod using the template beelow. THis gives me a list of taxonomy terms. How can I display ONLY those categories that have attached posts?

<article>
<a href="https://projectdmc.org/support/topic/only-show-categories-with-posts/{@permalink,esc_url}">{@name}</a>
</article>

I’ve tried something like this but I get 0 results.

<article>
[if count > "0"]<a href="https://projectdmc.org/support/topic/only-show-categories-with-posts/{@permalink,esc_url}">{@name}</a>[/if]
</article>
  • This topic was modified 12 minutes ago by rscarter1.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer