Using the JSON API via HTTPS and HTTP

You can serve your site on both protocols http and https. This might be problem if you care about SEO (duplicate content). You can use 301 redirection to force users to be redirected from http to https. Old app will be slightly slower because of redirection but it will be working. This might be problem … Read more

Passing data outside of WordPress possible?

I’m not an affiliate of Gravity Forms and I’m sorry if this offends someone, but based on my own custom form development experiences I can recommend it. Gravity Forms has very good API documentation that helps when customizing forms. For example on one site I used Advanced Custom Fields metafields as Gravity Forms radio field … Read more

Creating posts, containing data from remote API

Is it possible to create a create a custom post type for every product in this APIs and publish it on the website? Yes, loop through the results, and for each result, check if the post already exists. If it doesn’t use wp_insert_post to create the post. Try doing it on a cron job so … Read more

How do I filter Child Posts by Parent Post ID for Custom Post types in WordPress REST API response?

I’d start out by checking that your request is being passed properly. I’d do that by changing this: function custom_api_get_all_posts_callback( $request ) { // Initialize the array that will receive the posts’ data. $posts_data = array(); to this: function custom_api_get_all_posts_callback( $request ) { // Initialize the array that will receive the posts’ data. echo “<pre>”; … Read more