I am using a WP_Query to display the posts from a custom post type. I am using pagination and limiting the number of posts per page to 6. Everything is working but I want to add some information to the bottom of my visible returned posts.
If I had 10 total posts returned I want the bottom of page 1 to say 1-6 of 10 results. On page 2, I would want it to say 7-10 of 10 results.
I have figured out how to use found_posts to display the total number of returned results. so I can get the part “of 10 results”. But what I can’t figure out is how to display the post numbers and show the first and last of the visible posts.
- The topic ‘WP_Query – Paginated Visible Post Range – x-y of z Results’ is closed to new replies.