WordPress.org

Ready to get started?Download WordPress

Forums

How to Show the Amount of Posts on the Homepage Header? (2 posts)

  1. motz
    Member
    Posted 5 years ago #

    Hi there,

    i write several posts each day and i want my users to know how many posts are in total. I just want to show something like "10.000 posts and writing more!" something like that... how can i do it?

    thanks!

  2. iridiax
    Member
    Posted 5 years ago #

    The following code will display the total number of published posts:

    <?php $count_posts = wp_count_posts(); echo $count_posts->publish; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic