Hi all,
I'm trying to figure out how to have my home page categories display the total number of articles.
The example below is what I've previously done on WordPress (title, total, articles listed/ sections listed):
I know the category page can show the article count per section, but I'd like the total count for every article in a category:
Any tips would be great, I'm mostly getting error messages so far trying different helpers.
I think the best way to do this would be to use our [List Articles API](https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/#list-articles) to query each article for their section id first, then use the section id to track which category id it belongs via the [Show Section API]. It's a little bit of traversing through 2 different endpoints but you should be able to track how many articles are in each Category that way.
You actually could create an object to first record the total of articles per sections.
Then create another object where the category_id is each key. You'll only need to traverse through each section id in the first object then use it to hit the Show Section API, based on the category_id increment the value for the given category_id or if it doesn't exist yet in your object create it and +1 for the value. It will also be a good way to keep that data dynamic for when you add or remove articles.
Hope this helps!
Best,
Erica Girges - Dev Support