wordpress-rest-api Questions

3

Is there a way to get what come with wp_head() or wp_footer() in rest api call? I mean scripts and styles that can come from plugin or WordPress itself when I use wp_enqueue_script for example? T...
Shilashilha asked 15/2, 2017 at 17:41

8

Solved

I'm using the WooCommerce REST API (http://woocommerce.github.io/woocommerce-rest-api-docs/#introduction) and can download Customers, Orders, etc successfully. I'm now trying to get a filtered list...

5

I am trying to set up multiple Wordpress sites in sub-folders under our domain (ie not multi-site), but I have difficulty configuring the REST API endpoints. For example, this endpoint works fine: ...
Linkman asked 8/7, 2019 at 7:21

3

I want to make PHP app to create post on wordpress.com using REST API. I use this code: <?php $curl = curl_init( 'https://public-api.wordpress.com/oauth2/token' ); curl_setopt( $curl, CURLOPT_P...
Nay asked 3/3, 2016 at 7:14

5

Solved

WP 5.8 comes with a new system to manage events named "Widgets Block Editor". How can I disable this new system and restore the classic widget editor of WordPress?

4

Solved

I am trying to display posts using the REST API and I want to display them in menu order based on how they are positioned in the admin menu. I installed a plugin that allowed me to move posts to a...
Alisa asked 18/1, 2019 at 20:0

5

Solved

I am using the following to get posts http://demo.wp-api.org/wp-json/wp/v2/posts This by default gives me 10 posts, which is mentioned in the docs. But I want all the posts without having to kee...
Budweis asked 29/1, 2018 at 5:7

4

Solved

I'm trying to get all posts by ID's using WP REST API. As per the documentation, we can use filter to use WP Query arguments. Using this with posts end point returns all the posts. http://demo.wp-...
Mosquito asked 28/11, 2016 at 6:56

22

Solved

I have been using the Wordpress REST plugin WP-API for months now while developing locally with XAMPP. I recently migrated my site to an EC2 instance and everything is working fine except I now get...
Ashraf asked 8/1, 2016 at 6:8

3

I searched this issue and tried several solution with no luck. My main route is here: https://cnperformance.wpengine.com/wp-json/wp/v2/products?_embed I installed the 'WP REST API filter paramete...
Halfback asked 23/5, 2018 at 19:9

2

Solved

I am looking for a way to run a global search query across all or multiple post types using WP REST API. I am able to search posts using: http://example.com/wp-json/wp/v2/posts?search=test In ...
Chiang asked 28/6, 2016 at 19:30

6

when i paste this link http://localhost/wordpress/wp-json/wc/v2/products?consumer_key=ck_*******************&consumer_secret=cs_******************** it show for me this error message {"c...

8

Solved

web API build with wordpress is showing error of <script>document.cookie = "humans_21909=1"; document.location.reload(true)</script> it works sometime on some network and sometime no...
Costmary asked 30/4, 2019 at 6:43

4

Solved

I want to create a request from my application. (iOS and Android - Coded with Xamarin). Explaination: The request should trigger the WordPress action=lostpassword. - The user receives an email to...
Ripe asked 27/8, 2018 at 8:54

7

I'm trying to upload image via Wordpress REST api v2. So far all I managed was to create empty entries in wordpress media library. Meaning they have image names, but no actual image. POST Request:...
Arabeila asked 25/5, 2016 at 8:50

3

Solved

On my blog, I'm trying to create an endpoint in order to load more articles using ajax. However, the query string parameters don't seem to be passed down to my function. Here's my code, all of it i...
Mainis asked 12/9, 2018 at 16:36

5

Solved

I want to do this without using any sort of plugin since these are both core wordpress features (custom fields and the REST API). Here is the documentation for custom fields for reference: https:/...
Lighthouse asked 15/5, 2017 at 18:32

0

I'm trying to build a form to upload an image and later set it as a Featured Image for a post that will be created after the upload is complete. I'm using WordPress as backend and Next.js as front-...
Vallee asked 16/5, 2022 at 15:49

15

I have generated a consumer key and consumer secret. The website has SSL installed. I have also installed plugins required for JSON and REST services. This is how the url looks like: https://<u...

2

I'm a bit confused about how errors are handled in Wordpress's REST API. In their examples, they suggest using WP_Error to return errors, but WP_REST_Response has the HTTP status code as a second p...
Beluga asked 2/5, 2018 at 13:28

3

Solved

I am trying to create a custom endpoint for the WordPress REST API and pass parameters through the URL. The endpoint currently is: /wp-json/v1/products/81838240219 What I am trying to achieve is...
Ludendorff asked 2/11, 2018 at 21:41

3

I'm creating a payment gateway in woocommerce. After sending a request to payment processor server and return Success as a status code. The server will send a GET request to an EndPoint of my own p...
Obidiah asked 2/9, 2019 at 11:5

3

Is it possibile to return a document (a generated PDF, a CSV) using the WP_REST_Response in WordPress? So far I've been registering a custom endpoint using register_rest_resource but if I try to r...
Warwickshire asked 13/6, 2017 at 14:14

4

Solved

I want to expose all the ACF fields that belong to a page or custom post type to the WordPress REST API in order to do some API calls through javascript. The final expected result would be all the...
Phenocryst asked 6/6, 2019 at 8:44

4

Solved

I can pass integer values to WP REST API. But, cannot pass non-numeric characters. It gives error. This is what I used... add_action( 'rest_api_init', function () { register_rest_route( 'crowda...
Catholicize asked 19/1, 2017 at 10:20

© 2022 - 2024 — McMap. All rights reserved.