Is there a way to know the total number of posts before the loop starts? I'm thinking in use two loops. The first will do the counting, while the second one will handle the content. However, I don't think this approach is 'elegant'. Any other solutions?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
functions.php:
index.php:
|
|||||||
|
|
The number of all posts for a given query is in The number of all posts for just the page you are seeing is in To see all available variables test it with:
|
|||
|
|