filters – How to exclude or include categories in wp rest API without query parameters?

Question




for example I have cat1,cat2,cat3…cat10 in my custom post type.
and this is my rest API address for my custom post type:
https://example.com/wp-json/wp/v2/mycustompost
I don’t want to use parameters in my API address to filter categories.
I just want to show category cat1,cat5,cat7.
Please tell me how can I do this with PHP and without using parameters in address bar.
Thanks

0
Sadegh 3 weeks 2021-08-24T12:14:48-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse