1

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

2
  • Do you want to always exclude the same categories for every request? Commented Aug 25, 2021 at 0:02
  • @JacobPeattie Yes
    – Sadegh
    Commented Aug 25, 2021 at 11:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.