How to display total published post count in WordPress

Here’s a small piece of code which allows you to display the total number of published posts on your WordPress blog. To do this we are going to use wp_count_posts() function.

Useful Read: Grab WordPress Featured Image URL

<?php echo wp_count_posts()->publish; ?>

 

1 Comments

Leave a Comment.