I am currently building a headless Wordpress site using the WP Rest API.

With Custom Post Types I am currently using the following endpoint:


Can I modify / create and endpoint so that requesting CPT's can be done like so:


I would much prefer to use a URL query as it enables the use of ranges and feel it is just generally more user friendly.

  • That's not really how the API endpoints work. I fail to see how that's any easier though. It's just extra characters. What you you mean by supports ranges? – Jacob Peattie May 25 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.