How can I set the default ‘orderby’ and ‘order’ parameters for a REST API call?
How can I set the default ‘orderby’ and ‘order’ parameters for a REST API call?
How can I set the default ‘orderby’ and ‘order’ parameters for a REST API call?
Customizer Changeset, Sidebar and Rest API Custom Endpoints
Some hosts will use a page cache for API routes to deal with this kind of problem. My initial thought would be to look at something like Cloudflare (they have some WordPress presets too) that would allow you to set up this kind of page cache for these API routes. Interested to know how you … Read more
@TomJNowell pointed you the way to go. You have to enqueue a JS file, and within this JS file you can use any technique to do the REST request, like an XMLHttpRequest object or the fetch API. The REST API itself, of course, is part of WordPress, and defined with register_rest_route(). It is also something … Read more
Turn out it is caused by a BOM character from one of my included file. If you are having same problem, you can save your file to Encode in UTF8 without BOM.
Get custom data from the user REST API endpoint
Cant POST with REST API on WordPress
Getting current core version from an WordPress installation
Fetch post by author slug
A few things to try… Confirm you are using POST and not GET when hitting the endpoint. Postman could be helpful here. It appears you are testing your endpoint using Pretty Permalinks. Confirm you have Post Name permalink structure setup. This might be the solution to your problem. If that works however you are wanting … Read more