Top

Daily Tip: How to Display WordPress Total Published Post Count

November 6, 2010

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.

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

Tweet This Post

Comments

Got something to say?

Bottom
Article Archive  |  This site is a historical archive of pressography.com, a WordPress plugin and theme blog that published between 2006 and 2012. It is preserved for reference and is not operated by, affiliated with, or endorsed by its original authors. Nothing here is for sale and no form on this site is active. If you are the original owner and would like this domain returned, please get in touch.