I need to fetch the latest topics in public categories from my forum via an API call and embed them in my parent website.
I have implemented a basic solution using
I was successful in only fetching the latest topics from public categories via the following procedure -
- Fetch all the categories using the
- Filter out the private categories via the
- Call the endpoint -
As you can see, the length of the URL will go on increasing with the number of private categories.
Is there any better solution apart from this (and exposing a custom end-point via a plugin) ?
Note - I do not want to use “suppress from latest” feature. I want it under the latest tab in the forum but not in the API call response.