How to Display WordPress Total Published Post Count

Here’s a simple little snippet that I found over at the Hyperspatial Code Collective, a great source for interesting snippets such as this one. It displays the number of your total published posts on your WordPress site.

If you want to display how many posts you’ve published in your sidebar, you would add this to your sidebar.php file or any other file, such as footer, header, etc.

{code type=php}publish; ?>
{/code}