No ‘Access-Control-Allow-Origin’ when call rest API
just write this on your function.php add_filter( ‘allowed_http_origin’, ‘__return_true’ );
just write this on your function.php add_filter( ‘allowed_http_origin’, ‘__return_true’ );
Get non-rendered content from WP-API
Use the backbone.js client to save custom post type meta
WordPress API for search
It is possible, yes, but for this specific use-case I think you’ll need to do a little more legwork than usual. Add artist_count meta to building posts In principal we’d be trying to tell the WP_Query responsible for retrieving buildings to “orderby number of artists,” but since many artists are associated with a single building … Read more
Create a range slider to change font-size with different screens sizes in wordpress customizer api
Create a custom post with custom post-metadata with WP API
When loading blog B (thankfully) it doesn’t load plugins which are active on blog A only, and switch_to_blog() (thankfully) doesn’t do that either. You could trigger the update by using something like the JSON API (or XML-RPC, ewwww), or you could make sure the post type is registered both on blog A and blog B. … Read more
I have checked the WP REST API documentation for the version2-beta9, it is not yet implemented so I guess I have to code my own plugin to work around on it.
I had to trace through WordPress core and the REST API plugin code to fix this, but finally did it. The solution is described here. The TL;DR of the solution is that the WP-API will ignore the content of the login cookie and assume an unauthenticated (logged out) request unless the correct value is given … Read more