Rest Api How to get results of child categories with one api call

WP already does this out of the box thanks to the include_children parameter of tax_query which is true by default.

So you do not need to tell it the sub-terms, just do something like this:

/wp/v2/posts?categories=1

Leave a Comment

tech