Inspiration For Creative Minds
Home » Labs » Display total number of posts in category, WordPress  

Filed under Labs

Add below code to your WordPress template and it will show the total number of posts within the specified category.

    $cat_id = 1; // category number
    $total_posts = get_category($cat_id);
    echo $total_posts->count;
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook

Posts you may like: