[How to] Display Number of Posts in WordPress

Using WordPress core function wp_count_posts, you can easily display total number of posts. Here is a simple example on how to use this function: <?php $count_posts = wp_count_posts(); $published_posts = $count_posts->publish; echo ‘We published ‘ . $published_posts . ‘ posts until now, and it’s still growing..’; ?> This displays a text output like this; We […]

Read more [How to] Display Number of Posts in WordPress