Filter by custom field (meta_key) using JSON API

As this is too much for a comment, I’ll post here and delete later: http://example.org // domain ?json=get_recent_posts // controller # Arguments for the query start here &post_type=mytype &custom_fields=myfield &include=title,custom_fields &meta_key=myfield &meta_value=myvalue Have you tried the following? Debug the response: http://www.example.org/api/get_page_index/?dev=1 Widget-style JSONP output: http://www.example.org/api/get_recent_posts/?callback=show_posts_widget&read_more=More&count=3 Redirect on error: http://www.example.org/api/posts/create_post/?callback_error=http%3A%2F%2Fwww.example.org%2Fhelp.html And could you post what you … Read more

Create User using JSON API

I’ve never worked with that plugin and a new JSON Rest API will maybe be included in core with one of the future versions. So far it’s as well available as plugin. To make it short: There currently seems to only be three kinds of Controllers in that plugin Core Posts Respond But there’s a … Read more

Json api does not return all metadata

As @TheDeadMedic mentioned the API will exclude any meta with underscore. It’s not a good idea to remove the underscore as it might break something in your code or dependencies, however you can try adding a code like this in your functions.php to unprotect the desired meta add_filter( ‘is_protected_meta’, ‘wp692_meta_unprotect’, 10, 2 ); function wp692_meta_unprotect( … Read more

Why aren’t tags and categories added in post request to WP Rest API

You are using name in your terms. In default, try to use the existing term id ( in your case, cat ID and tag ID ). If you see https://plugins.trac.wordpress.org/browser/rest-api/trunk/lib/endpoints/class-wp-rest-posts-controller.php#L918 they will handle your term with sanitize them into non-negative integer using absint. I hope this help. Here example code to hook rest_insert_{$this->post_type} to create … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)