Counting pages/posts
-
Is there a way to output a count of the number of pages/posts that fit a certain filter? For example, the number of child pages of the current page? The number of comments on a specific page?
For example, I’m making a kind of encyclopedia. There are topics which for the most part for now are countries. The child pages of each country have the information I display on the country, using ACF on each page to store the information. Each page can have comments. When listing the child pages on the main Country page, I want to show how many comments are on each child page as a kind of indication of how how discussion is taking place.
Some countries have Provinces which are also child pages, and have their own child pages with information. These Province pages would be topics in their own right. In the future there may be some countries and provinces that have city child pages which would also be topics.
I’d also like to have a widget on the front page of the site that lists the number of topics (countries, provinces, cities), the number of resources (all child pages of all topics), and all comments.
Is this possible? Thanks.
https://www.ads-software.com/plugins/custom-content-shortcode/
- The topic ‘Counting pages/posts’ is closed to new replies.