Conditional use of wp_list_categories (Wordpress)
Posted
by YsoL8
on Stack Overflow
See other posts from Stack Overflow
or by YsoL8
Published on 2010-06-12T09:58:33Z
Indexed on
2010/06/12
10:02 UTC
Read the original article
Hit count: 198
Hello
I am using the wp_list_categories tag in Wordpress. I would like to wrap this in a condition so it is only used when there are posts in the database. Something like:
if ($number_of_posts > "0") {
}
But I can't find a function that'll let me count the number of posts. Anyone know the solution?
© Stack Overflow or respective owner