wordpress api using rest_route for other pages

Question

Ok, so I am using WordPress rest API to fetch the data using front-end. I am having the plain permalinks and unfortunately, I am not allowed to change the permalinks.
So, for

https://www.example.com

I am using the route option:

https://www.example.com/?rest_route=/wp/v2/posts

And this is working completely fine.

Now my question is if I want to access a page URL with query params :

https://www.example.com?cat=12

How could I do that with rest_route? Thanks in advance.

0
, , , New 4 years 2020-05-21T07:10:25-05:00 0 Answers 91 views 0

Leave an answer

Browse
Browse