WordPress count posts

18.Sep.2010

If you would like to present number of posts on your WordPress blog – than you could use WP function called wp_count_posts(). And if you want to just count published posts, follow the snippet below:

echo 'So far - we have published: ' . wp_count_posts()->publish . ' posts!';

Example of count posts

StuntCoders has published:

[count_posts] snippets