Are all ID’s used unique?

If you look at the description for the different tables used by WordPress, the columns described as “auto_increment” will be unique. I am not sure what you are doing though. The URL structure you are using is not one that I recognize. That is, the syntax I think you want is this: example.com/?p=1774 rather than … Read more

WordPress wp-json API – Custom Post Type returns 403

In version 1.1 of the JSON REST API custom post type endpoints have to be registered manually. See: http://wp-api.org/guides/extending.html#registering-your-endpoints In version 2.0 we register endpoints for any custom post types registered with the show_in_rest property set to true. Documentation on how to do this: http://v2.wp-api.org/extending/custom-content-types/#registering-a-custom-post-type-with-rest-api-support

POST to a REST API from a wordpress form

I don’t know of a plugin that does it in a general way; for the most part, you’ll need to build something custom for each specific API you intend to communicate with. For your purposes, the key function will be wp_remote_post(), which is a wrapper for the POST method of WP’s HTTP class. (Use this … Read more

Sorting results from JSON-API on custom fields

Looking through the source code, this plugin maps the query variable orderby to the WP_Query argument of the same name, orderby. What this means is that you should be able to do the following: http://www.example.com/wordpress/?json=get_author_posts&author_slug=user&post_type=custom&include=title,custom_fields&custom_fields=date_value&count=10&page=1&orderby=date_value

WP set auth cookie using Ajax is not saved to browser

I assume that your custom dashboard is on a different domain/subdomain than the WordPress installation. Cookies can only be set for the current domain. Typically cookies will not work cross domain. So your dashboard cannot create a cookie for the WordPress website. Theoretically it’s possible to bypass with some server configurations, but this technique has … Read more

Retrieve all users from wordpress database via REST/JSON API

Thanks to stackoverflow user Milap ! You can get all users even they have not created any post, for that you need to modify rest-api plugin. Open wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-users-controller.php file, you will find below code on line number 106, if ( ! current_user_can( ‘list_users’ ) ) { $prepared_args[‘has_published_posts’] = true; } Change it to below, if … Read more