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
0
votes
1 answer

Showing data with specific parameter in Wordpress Query

in there i have profile_driver, i want to make this data will show when i input the parameter first. example input the 'id' $command = $_GET['command']; switch ($command) { case 'profile_driver': if(!empty($_REQUEST['id'])) { …
APSB
  • 577
  • 4
  • 11
  • 28
0
votes
3 answers

Blank response when i want to display postmeta Wordpress

in there i want to display my data. when i try to display my data without postmeta its work but when i try to improve with postmeta i get blank response $command = $_GET['command']; switch ($command) { case 'list_product': $loop = new…
APSB
  • 577
  • 4
  • 11
  • 28
0
votes
1 answer

How to convert WordPress plugins to use WP REST API

I've been reading about WP API and I love the idea however is it far enough along to use? For instance I want to build a custom react front end but use the WP API. My concern is that I won't have access to certain plugin information. Is it possible…
bstras21
  • 981
  • 3
  • 11
  • 32
0
votes
1 answer

Display json array

I am trying to read an api I have implemented with Wordpress using WP-API V2, I have used several plugins to return the information i need. The source json can be found here. I need to return pure_taxonomies->property-status->name. I have tried the…
Aaron
  • 3
  • 3
0
votes
1 answer

SPA with content management

I would like to build Single Page Web Application (SPA) with React.js. Application would need some Content Management System for back-end. I was thinking to use WordPress and their REST-API's but I don't know how to retrieve data from my wordpress…
Eljas
  • 1,187
  • 4
  • 17
  • 37
0
votes
1 answer

WP rest api v2 in production

currently I'm working in a WordPress project. I would like to do a AngularJs frontend that consumes the data from WordPress CMS but I'm not sure it's a good idea. I have some questions about this: Is wp-api v2 ready for production environment? If…
0
votes
1 answer

CORS error when using HttpRequest.getString(url)

The whole application is built with Angular 2 for Dart. At one place I have a service with a really naive HttpRequest.getString() call with no special parameters or anything. String response = await HttpRequest.getString(url); On the server side…
Maximilian Riegler
  • 22,720
  • 4
  • 62
  • 71
0
votes
1 answer

Authentication WP API with JWT switching method

I have a basic WP site set up with the WP API 2 (beta13.1) and JWT plugins. If I make a call to the /token endpoint while i'm already logged into WP, I get a successful response. However, if I'm not logged in, I get a "No route was found matching…
jdrucey
  • 35
  • 10
0
votes
1 answer

Wordpress REST API custom form submit - React

Wanted to POST custom form data through Wordpress API using ReactJS. Like we use AJAX in Wordpress using something like jQuery.ajax({ type: 'POST', data: { action : 'formData', // wp_ajax_nopriv_formData …
Ank
  • 168
  • 1
  • 2
  • 11
0
votes
1 answer

authenticate in wordpress Api using Basic Auth plugin not working

I am using wp-api-v2 and Basic Auth plugin to add post to my wordpress. it work nice in my local wamp server but wen i upload my code on online server my credential not working and prevent me to aading new post by this error: "Sorry, you are not…
Navid_pdp11
  • 3,487
  • 3
  • 37
  • 65
0
votes
1 answer

headers response in http.get

I spent hours trying to figure out how to get headers response like x-total-objects and status code after http.get request, I have this class service, and I need to access those attributes to paginate my results in service: @Injectable() export…
Murhaf Sousli
  • 12,622
  • 20
  • 119
  • 185
0
votes
1 answer

Adding ACF to CUSTOM wp api endpoints

I'm writing a custom endpoint for WP API, to retrieve posts from wordpress that for example are from the 'real_estate' post_type and capacity for '5 or more' persons. I've built a new custom endpoint: // permite que meta_key e meta_value // sejam…
0
votes
1 answer

ui-router activates 404 instead of requested state

I am using WordPress rest API and I have states in my AngularJS app as below: .state('public.blog', { abstract: true, url: '/blog', template: '', }) .state('public.blog.home', { url: '/', …
bobsilon
  • 1,648
  • 4
  • 20
  • 33
0
votes
0 answers

wp_remote_get() request failed when requested from certain server

I'm creating a WordPress plugin for my client using WP REST API V2, and i got a problem with the wp_remote_get() function, My wp_remote_get() always return "http_request_failed" when I send the get request to the server from the client-side…
0
votes
1 answer

Use two taxonomy terms in one URL WP-API

At the moment I'm calling taxonomy term data using URL's like this - http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area]=northwest Is there a way I can call two taxonomy terms at the same time, something like this?…
Lucy Brown
  • 264
  • 4
  • 17