How to Display WordPress Total Published Post Count
Here’s a simple little snippet that displays the number of your total published posts on your WordPress site.
FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.
FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.
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; ?>