You can give a try to this within a loop
<?php
echo $wp_query->found_posts - $wp_query->current_post ;
?>
$wp_query->found_posts gives the total number of posts found matching the current query parameters.
So the if there are 20 posts, result for each post should look like this
For 1st post it will display 20, i.e. 20-0=20
For 2nd post it will display 19, i.e. 20-1=19,
…
…
…
For 12th post it will display 9, i.e. 20-11=9, and
For 20th post it will display 1, i.e. 20-19=1,
Related Posts:
- How to mark every 3rd post
- Count posts within a custom post type and specific taxonomy and terms?
- How to Display a List of Users Who Have Made at Least 1 Post?
- How to Display Network Post Count?
- has_archive=false on the default post type
- Clear cache when a post is submitted [closed]
- How to cache a shortcode functions output?
- Post Format Archive template name for theme folder?
- Count posts in category including child categories
- widget should display post archive by year and on click also by month
- Count singular post views automatically
- Must permalinks always point to single post pages?
- Set font size automatically according to number of words in post
- At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID
- Display most recent post in category instead of archive?
- Network wide post count (WP Multisite)
- Single.php Active Category Class
- Redirect based on user post count
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- get_post_type_archive_link(‘post’) returns current category archive
- Show that current post is number X out of X
- How to get the latest posting time of archived pages in WordPress?
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- Double count view in archive.php
- change default post archive page link
- Count to how many categories a post belongs to
- Display posts from #6 to #20 on archive page
- Count search results in heading
- How to hide first gallery for every post?
- Category List (Archive) Page Template By Category
- Getting category posts from a certain year
- Yearly archive page for future year
- Which URL to enter into browser to show all posts in archive.php?
- Display Published Posts Count for Certain Time Period
- How to display data in archive page?
- Archiving by academic year instead of calendar year
- List category posts alphabetically on archive.php
- How to display excerpt post on hamepage and archive pages?
- Display Notification Bar on Header on Certain Post Count
- Show posts count for Categories and Tags in wp_nav_menu
- How to add category post count in main navigation menu [closed]
- Counter is skipping post when I still want it visible [closed]
- Custom Post Type archive
- Does WP automatically tag posts into the archive?
- Get post number both in the loop and in the post
- How do I insert a after every 5 posts in a WordPress Loop that infinitely loads posts?
- singular posts using archive styling
- Count the number of a post types associated with another post type
- Post-Archive like a page in a specific subdirectory
- Display amount of pending posts in back/front end
- Display in category ( taxonomy) a number of post that I want
- Count user posts and store the number for later use
- Find out in which kind of archive am I
- adding my posts (author posts) in menu
- How to view all posts (on site, not admin) that are uncategorized?
- Permalink Short code showing unnecessary link text inside the loop
- Author post count in category
- Set post title font size automatically according to number of words in post title
- How to hide protected posts from archive?
- blog post not accesible on click [closed]
- Redirect to custom post if custom archive page has just one result?
- Posts are not displaying on their category and tag page
- Show post count in custom taxonomy page
- Count singular post views automatically
- How to count posts in tags within time limit
- Display Custom Post Category Count & WordPress Category Count Using Shortcode
- Prevent Archive URLs
- view a list of 3 future post, from the nearest to the most far
- Get posts from category from custom query
- Display number of post published every day
- Retrieve posts inside foundation tabs and tab-content split by 3 per row
- Alternative content between posts no repetition
- count_posts to a standalone link
- Page 2 has no posts?
- How to control Post view count incresing in sidebar widget posts too?
- Disable archiving of old posts?
- How to display term in archive page?
- My posts section for logged in user
- How to organise post by category and date
- How to mark every 3rd post
- Add a minimum word count to Excerpt (and how to force Excerpt as a rule for WyPiekacz)
- How to get alphabetic listing x other posts, based on first letter post?
- How do I display the next 3 posts in the sidebar?
- How to limit the number of posts a user can publish based on user type
- ho can I get the number of the current post instead of the post id?
- Display all posts from selected month
- How to get pagination working with “Pending” Posts
- Show all posts in category
- Adding Count Post in Page
- how to show all post with its contents
- Add author section on Author archive posts
- Count words for all posts by all authors
- Word count for all posts of all authors
- Filter/Sort Post Form On Taxonomy page
- Global $post value outside the loop
- Category and archive issue
- How to get total posts count for each date?
- Display posts on a custom page from only a specific category?
- Comment count next to post title?
- Display post archive as a month table, show last three months