Ready to get started?Download WordPress


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

  1. motz
    Posted 6 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?


  2. iridiax
    Posted 6 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