Get the number of posts in a named category, outside the loop

I’m a bit unsure of you are actually asking, so apologies if I understood it wrong.

You can use get_category() to get the category object and then just simply echo the $count property value

$cat_count = get_category( 'ID OR ROW OBJECT' );
echo $cat_count->count;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)