Questions tagged [wp-api]

Provides an easy to use HTTP REST API to access your WordPress site’s data.

This project was born to create an easy-to-use, easy-to-understand and well-tested framework for creating these APIs, plus creating APIs for core.

This plugin provides an easy to use REST API, available via HTTP. Grab your site’s data in simple JSON format, including users, posts, taxonomies and more. Retrieving or updating data is as simple as sending a HTTP request.

Official website

235 questions
1
vote
1 answer

WPAPI: Parent Page not shown in WP UI for API created pages

I am using the WP-API to create Wordpress pages via API. As I have a nested structure I want to create pages which have parent pages. This seems to work fine. However, when I view these pages inside the WP UI page detail view the parent pages are…
threxx
  • 1,213
  • 1
  • 31
  • 59
1
vote
0 answers

Omit CORS in IONIC App

I have an Ionic 3 app in which I calling up wordpress api values from my website - I would like to omit CORS on my localhost Ionic server as it is telling me the following Failed to load…
roshambo
  • 2,624
  • 6
  • 31
  • 54
1
vote
2 answers

Fetching User Data From ID: WP REST API

I'm building out my first full production website with react and I've run into an issue with the WP REST API. I have a blog page which lists my posts from WordPress no problem. The only issue is, I map over the array of posts and the author is a…
FreddieMixell
  • 300
  • 4
  • 15
1
vote
0 answers

React Native App with WordPress REST API - not allowed to create posts as this user

I'm working on an application in React Native with simple Wordpress backend using REST API and I didn't have any problems until I used GET method. Now I need to create a blog post using the POST method and I'm still getting an error... What I…
Peter El
  • 11
  • 1
1
vote
1 answer

Node wp-api create() not working after last update

Recently wpapi updated and ther is no option to send posts or images via post api but maybe some errors in code. Here is half workable code for uploading images and post data to wordpress. #!/usr/bin/env node var moveFrom =…
1
vote
0 answers

Custom Wordpress Feature Media (wordpress-feature-media) to better_featured_image for ionic3

it was a long title :( I need your help. Ionic application development. With the following codes, I can display single images in Articles. But I want to view multiple pictures. My codes are as follows; Wordpress Url:…
1
vote
1 answer

How to use the Wordpress API to install plugins

How can I install and activate a predefined list of WP plugins using the WP API using Php please?
Nick W
  • 877
  • 2
  • 15
  • 30
1
vote
2 answers

react-meta-tags with Wordpress API server rendering

I'm using Wordpress API as my backend CMS with a headless React frontend. The last piece I need to set up is social Open Graph Meta tags. I'm using the NPM package react-meta-tags and trying to understand how to pass the server side rendering in WP…
theGrizz
  • 116
  • 9
1
vote
1 answer

WP REST API v2 - exclude custom taxonomy

I have created some custom taxonomy and am utilizing WP's REST API v2. I am able to call posts with a specific taxonomy id like so: http://example.com/wp-json/wp/v2/posts?custom_taxonomy=14 This works great to retrieve all posts with this category.…
1
vote
1 answer

I want to get data in wp Api using search keyword

I want to get data in wpApi in url i am using search like this https://www.digitemb.com/wp-json/wp/v2/posts?_embed&?filter[order]=DESC&filter[posts_per_page]=5&search=digitize&page=1 My Question is that How do i get posts data from specific…
1
vote
1 answer

Querying WordPress WP-API for lots of posts (using promises!)

I am working on a Node.js application which uses the WordPress JSON API as a kind of headless CMS. When the application spins up, we query out to the WP database and pull in the information we need (using Axios), manipulate it, and store it…
Zfalen
  • 878
  • 6
  • 20
1
vote
1 answer

WP REST API Media upload using fetch()

I'm trying to use fetch() to perform a media upload in WP Rest API using JS (React Native). Here's what I've done so far: fetch('https://www.example.fr/wp-json/wp/v2/media', { method: 'post', headers: new Headers({ …
enguerranws
  • 8,087
  • 8
  • 49
  • 97
1
vote
0 answers

WP Rest api v2 disable accessing data in another site

I am developing a blogging site using Wordpress as backend and Laravel as frontend with the help of WP Rest api v2 but i am having trouble with data accessing authentication. My website have been developed but problem is that i want my website…
Amit Kumar
  • 143
  • 3
  • 15
1
vote
0 answers

Uncaught (in promise) Error: Request failed with status code 401 axios wp-api POST

I am using react as a front end for a wordpress site. From a form i am trying to POST data to wordpress using axios and the wp-api. Below is how I am trying to do this, but I keep getting: code: "rest_cannot_create", message: "Sorry, you are not…
Phillip Hogan
  • 123
  • 1
  • 2
  • 9
1
vote
1 answer

register_rest_field update_callback not work

I’m trying to update a custom field, but when I run the route through POSTMAN it does not update the field. Creates a new record. The route is something like: $POST …wp/v2/posts/362/meta?key=servicos_status&value=pause Someone help me? code print