Articles of rest api

WP REST API – log in with Facebook

We’re developing a mobile application for a web site that uses WordPress and exposes a REST API through the WP REST API plugin. We have very little prior experience with WordPress. One of the requirements is to implement a login via Facebook feature, so that users could log in either by using their login and […]

WP Rest API and json_decode()

I’m getting familiar with the WP REST API 2 plugin and I started following the amazing directions from Torque’s Guide. Everything seems pretty clear but I’m having trouble understanding this error (Keep in mind I’ve follow and reviewed all directions step by step. Here is the function I’m using: $url = ‘http://rbm.dev/wp-json/wp/v2/works/53’; $response = wp_remote_get( […]

WP REST API – get custom taxonomies based on terms & filter

I need to get the list of data’s with taxonomy term property_category,based on this property_category having data’s like apartment,house,office etc.For example localhost url given http://192.168.0.101:8383/wp-json/wp/v2/taxonomies/property_category And also need to get the list of data’s with taxonomy term property_type_category,based on this property_type_category having data’s like rent,sale. http://192.168.0.101:8383/wp-json/wp/v2/taxonomies/property_type_category And also one more question while filtering the data’s […]

Replace content via rest api only?

I am not really looking for code as answer but just the idea. How can i replace content in posts or pages without using short codes or plugins via the recent rest API? In template engines you’d have variable place holders filled later by whatever but I’d like to get exactly around writing extra wp […]

How to call wp plugin REST functions without curl?

I’m using the JSON REST User plugin which extends JSON REST Api. I’m sending http data to-from the api up to 4 times back to back in some cases which is dragging network performance. How can I call http://localhost/wp-json/fb_connect?x&y&z from php without using curl? (I’ll use curl if it makes the most sense) the main […]

How to authenticate a user with an external webservice

I was asked to login wordpress with an external webservice and at the same time to use the original wordpress database, ie, the webservice would only obtain data for the user profile and its authentication and it would not be possible to modify any of the profile data(for Security reasons), but all the content of […]

WP rest api v2 posts filter by 'search' & 'category_name' not working

I am calling the api as http://examples.com/wp-json/wp/v2/posts?filter[category_name]=uncategorize&per_page=30&order=asc&search=hello I am not able to get particular posts from that specific category. I got all results from all categories.Any suggestions please.

WP-RestAPI and xml sitemap

Using the WP-RestAPI to pull a wordpress blog into an angularjs application. Works extremely well. The blog is using Yoast SEO for the for meta descriptions and keywords. I would like to use the yoast xml sitemap as well for submitting to google. However, because of route structure I need to save the sitemap to […]

WP REST API and Access-Control-Allow-Origin

In one of my project I use a WordPress REST Api. When I was enabled cache by WP Super Cache plugin I have an error now: XMLHttpRequest cannot load http://api.mydomain.com/wp-json/wp/v1/posts. Origin http://mydomaintwo.com is not allowed by Access-Control-Allow-Origin. How can I fix it?

WooCommerce REST API endpoints don't exist

Note: This question is a verbatim copy of the one I posted a week ago there. I’ve tried various solutions from other questions with no luck, until someone suggested that I ask here on the WP dedicated SO. After installing a fresh WordPress 4.8 instance and the latest version of WooCommerce 3.0.8, we are trying […]