Wordpress - Total number of posts in a category


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $totalposts = get_category_by_slug("mycategoryname")->category_count;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.