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

Load post content into Bootstrap modal using REST API

I want to load the content of a Wordpress post into a Bootstrap modal. For performance reasons, I want to load it when the modal opens. I found this in Bootstrap documentation (I'm using Bootstrap v.3.3.7)
1
vote
2 answers

Fetch wordpress posts of custom post type using the WP Rest API javascript Client (backbonejs)

I am developing a reactjs backend using the WP REST API. I am now trying to take advantage of the built-in javascript client so I have installed the wpapi node package in my project (https://www.npmjs.com/package/wpapi). I have enabled the…
mcartur
  • 325
  • 3
  • 13
1
vote
1 answer

How enable guest comments in Wordpress 4.7 API

I use WP-API plugin version 2 and now after update WP API integrated to WP by default, but in new version Wordpress 4.7 by default disabled guest comments via API. How enable it?
KingStakh
  • 303
  • 3
  • 13
1
vote
2 answers

Using custom WP-API endpoints with the included Backbone JS client library

So I have created a custom endpoint using WP-API plugin. When testing with Postman, the endpoint works as expected. The problem is that when I try to access the custom enpoint using the built in Backbone JS client, I cannot see my new endpoints in…
karatecode
  • 574
  • 6
  • 21
1
vote
1 answer

WP-API Get Posts After a Specific Date

I'm using Version 2.0-beta15 with a custom post type that inherits from the WP_REST_Posts_Controller, but needs to query for a date based on an acf field. Yikes! Endpoint…
Tom Doe
  • 866
  • 1
  • 13
  • 22
1
vote
1 answer

Wordpress REST API 404 error when requesting Custom Post Type with Mobile Browser

I am confused. I am using Wordpress REST Api to build a mobile app with Ionic. I am trying to implement regular post type and one of my custom post type. I can make a get request for the standard post type…
1
vote
0 answers

How to restrict WP REST API requests

I installed the WP API plugin and OAuth 1 plugin (https://github.com/WP-API/OAuth1) and everything seems to be working. Via Postman I send a request and get this…
bstras21
  • 981
  • 3
  • 11
  • 32
1
vote
1 answer

How to secure wp-api to prevent people add/remove posts?

I am new to wp-api. I did install it and I am able to make some GET requests to retrieve content from my blog. My question is very naive : can anyone send some DELETE/UPDATE rest requests to modify/delete my posts or must usre be authentificated…
yarek
  • 11,278
  • 30
  • 120
  • 219
1
vote
1 answer

Search post by categories Wordpress WP-API

I want to search posts by categories in the WP-API. I know I can search posts by the attribute categories or filter[cat]. But the posts contains more than one category. I tried to search like…
ZizouJd
  • 79
  • 3
  • 12
1
vote
1 answer

How to import json in wordpress?

I have real estate listing wordpress website. All the listings are stored in custom post type. I was able to fetch listing data through wp-api but I want to post listing through external json file that is provided by other website.…
Sagar Sadrani
  • 312
  • 2
  • 13
1
vote
2 answers

Wp-api 2 cookie authentication

So, I have a php page in wordpress (WP-Api 2): esc_url_raw( rest_url() ),…
dehq
  • 449
  • 5
  • 12
1
vote
0 answers

How to eager load featured_media, categories and author along with the post with WP-API

Is it possible to eager load featured_media, categories and author information along with the post data with wp-api. I've checked the docs (http://v2.wp-api.org/reference/posts/) and can't find any information on it. I'm coming from a PHP…
ChazUK
  • 744
  • 4
  • 26
1
vote
3 answers

How to get token without passing username and pass in url parameters?

In order to get token i post following request: http://example.com/wordpress/wp-json/jwt-auth/v1/token?username=MYLOGIN&password=MYPASSWORD and in response i get token - that's nice, but... what if i don't want to show username and login in…
Dariusz Sikorski
  • 4,309
  • 5
  • 27
  • 44
1
vote
0 answers

Using WordPress API with Slim 3 and Twig Views

I'm trying to integrate a decoupled wordpress/wp-api to a Slim 3 framework with Twig views. Ideally I want to send all posts to /posts route rendered via Twig and Individual posts to /post/hello-world route I'm having two issues for now: I want…
Ali Asim
  • 21
  • 5
1
vote
1 answer

How to cope with differences in the GET and POST JSON scheme of WP-API

I have a WordPress website with the WP-API plugin so I can request data for my Android app. Until now I only fetched data, but now I want my Android users to be able to make comments on articles. So I need to be able to create new comments through…
thomas479
  • 509
  • 1
  • 6
  • 17