The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
18 views

Wordpress WP-API Failed to run

I'm installing a clean wordpress site and trying to learn on how WP-API works. i read the documentation on v2.wp-api.org .. it said ".. Want to get your site’s posts? Simply send a GET request to /wp-...
0
votes
0answers
21 views

trying to write rest api in wordpress json

i am working with a company that is called cordial (online crm/marketing co) that uses rest api to interact with their system. I'm trying to create a rest / json interaction that will allow me to ...
0
votes
1answer
27 views

How do I query my Wordpress posts on another HTML page using the Wordpress Restful API?

I have a fully functional Wordpress site and I want the to create a new separate website that displays the posts from the wordpress site using the Wordpress Rest API. I understand that typing http://...
0
votes
1answer
93 views

WP REST API - Retrieve content from page

I already get posts from categories with: http://domain.com/wp-json/wp/v2/posts?filter[category_name]=category-name but how can i retrieve content from page? - [page_name]=page-name for example but ...
0
votes
1answer
44 views

WP-API + JS Backbone client - how to update post meta

Using the WP API and Backbone-based JS client, I'm trying to update a post's metadata as follows: var parentId = 96; // the post id var metaData = new wp.api.collections.PostMeta('', {parent: ...
1
vote
0answers
44 views

WP REST API route request explain

Maybe can someone explain or show additional info about "WP REST API route request" from beginning to the end. Main questions, how handle this request in most earlier stage. For example for ajax ...
0
votes
0answers
91 views

GET request for media files in WP REST API 2 results in an empty array

EDIT: I have reported the issue to the development team of the plugin and they have resolved it in BETA10 version of the plugin. I have been trying to fetch all the media files from the REST API ...
-2
votes
2answers
22 views

Do i need to use PHP in customizer api?

i understand with the wp rest API i will be able to build Wordpress themes with other languages but will i be able to do the same in customizer api or would i need to use php to give customization ...
1
vote
1answer
41 views

Does it still make sense using json endpoint ep_mask now that there's the new rest api? [closed]

I was wondering... Maybe I don't get the point here, don't know. I think that the rewrite api is still usefull for creating beautiful frontend urls for regular users. But I'm not sure on adding a json ...
1
vote
0answers
13 views

AFNetworking incorrectly interpreted WP_Error

I have client code that communicates with the server to create an account. The communication works, but the error response is not received correctly. In the Objective-C code below, I use AFNetworking ...
5
votes
1answer
257 views

how to authenticate for the REST API from a plugin and from command line

I want to try the new REST API but I'm not used to this kind of things. Basically, I want to use it to GET custom posts via ajax and show on the website frontend (I'm building an ajax product ...
1
vote
1answer
531 views

How to remove rest api link: in http headers?

i would like to remove the "link:" line added to the http headers since wordpress 4.4 here is a curl -I killcandida.org here is the output extract of the line that i would like to delete: Link: ...
1
vote
0answers
177 views

WP - API - OAuth 1.0a Server, How to implement with AngularJS?

I making an Angular WordPress theme and I want to add authentication to it using the WP REST API - OAuth 1.0a Server plugin, which isn't documented not very well. I get oauth_token and ...
6
votes
1answer
1k views

Query WP REST API v2 by multiple meta keys

Using v2 of the REST API, I'm wanting to query some posts by multiple meta keys. With v1 I was able to format the url like &filter[meta_value][month]=12&[meta_value][year]=2015 and it worked (...
1
vote
1answer
336 views

How to loop through JSON data in wordpress WP REST API

I am using the WP REST API plugin in wordpress and want to loop through my json data using a for each loop, however when I var_dump the variable that the json data is stored in it gives me an error. "...
1
vote
1answer
26 views

Transfer WordPress post to RoR site: is the REST Api the only and/or best solution?

I'm creating a new version of my site without WordPress, using Ruby on Rails. How can I transfer all my posts and users to this new site ? I was thinking of using the REST Api but none of the ...
3
votes
1answer
1k views

Add media with WP-Rest-API v2

I need your help to upload a media image in my wordpress blog via the Wp-rest-api v2 and Oauth2 authentication. I did not find in the REST API documentation the way to send my image data (name of ...
0
votes
0answers
200 views

Wordpress REST API not returning all posts

I am trying to get the json data of my posts. I have tried with both v1.2.4 and v2 of the REST API plugin. If I enter http://example.com/wp-json/posts?type=magazine or http://example.com/wp-json/...
2
votes
1answer
102 views

Request object for validate_callback

I'm trying to define a new REST Api endpoint based on WP REST API (version 2) and have question relating to what arguments are available to the validate_callback and sanitize_callback. Is the Request ...
1
vote
0answers
150 views

selfhosted site, slow REST API-calls

I'm using Wordpress REST API to access some posts from an app were creating, but the api-calls are really slow! if i'm using the domain in the call like this: https://public-api.wordpress.com/rest/v1....
0
votes
1answer
806 views

WordPress REST API Plugin Development - Add Custom Endpoint

I have this question on Stack Overflow but thought here might be a better place for it... I'm almost certainly doing something stupid - or rather not doing something obvious that I should have done. ...
0
votes
0answers
118 views

WP REST API, query total posts in a category

I have just started playing with the WP REST API and found that when querying posts that there is a limit of 10 post per page unless specified. What I would like to know if is is possible to return ...
0
votes
1answer
165 views

Wordpress /users/me endpoint request forbidden

Using Wordpress's plugin WP REST API version 1, there is an endpoint called /users/me which response with data for the currently logged-in user. When I requested /users/me I got 403 Request Forbidden ...
0
votes
0answers
67 views

REST API routes for site options

On XML-RPC api, there is a method to get the site options called wp.getOptions How do I get the same data using WP-REST API? I'm currently using WP-API version 2 (beta) but also curious about version ...
0
votes
1answer
539 views

Retrieve posts by page in wp rest api

I want to develop an app for my WordPress.org website. I am using wp rest api to receive post in json. My question is how do I retrieve posts page by page. For example if there are 50 posts I want to ...
0
votes
1answer
300 views

multi-language multi-site with REST API

I am creating a site with multiple sub-sites that should support multiple languages and be queryable with a REST API. The site itself is mostly a CMS with various pages and maybe some posts for ...
0
votes
1answer
470 views

Creating products using a REST API

I want to build a wordpress website which will have a lot of products (for beginning 0.5 million). Therefore, an third part API will be used to create the woocommerce products. However, i'm confused ...
0
votes
1answer
270 views

Passing form data via AJAX to REST API And displaying results

I'm new to WordPress but have been programming PHP for a long time... I searched a bunch of questions but couldn't find what I need. I have a page with a search form that contains a few parameters ...
2
votes
1answer
293 views

How do I use the WP REST API plugin and the OAuth Server plugin to allow for registration and login?

Are there any example projects that do the same? I want to be able to login and register for accounts on my site via the API.
0
votes
1answer
234 views

WP REST API returns post image URL with double backslashes

I'm trying to create a mobile application that use WordPress as a backend CMS, i was able to get the JSON output using WP REST API and reuse what i need from the output in my application, but i have a ...
1
vote
1answer
233 views

Hook before posting via JSON REST API

I have been testing out the JSON REST API the past few days with some pretty good results however I have run into a bit of a barrier when making a post. I need to hook into the post call before the ...
4
votes
1answer
268 views

Updating Post Meta with Backbone and the REST API

I'm getting started with a project that is making use of Backbone and the WP REST API, but I"m having a little trouble. Using the built in API JS for models and collections allows me to pretty easily ...
1
vote
2answers
224 views

REST alert when new Wordpress post is published or updated

I have a custom PHP application and a Wordpress instance running as 2 completely separate codebases on the same server. I would like my custom PHP application to be able to consume content from the ...
3
votes
0answers
122 views

Implementing the wp json-rest api

I have a client that wants to use the wp json-rest api to allow third-party sites to push custom posts (in this case property listings) up to our site. I've been looking at using the wp json-rest api,...
3
votes
1answer
980 views

Retrieving pages with multiple tags using REST API

I'm having some difficulty understanding syntax to make a call from my application to the wordpress REST API when it it comes to getting pages that contain multiple tags. I have no problem with doing ...
1
vote
1answer
1k views

Querying A Post That Includes Two Taxonomies Using JSON Rest API

I'm using the JSON Rest API plugin (https://wordpress.org/plugins/json-rest-api/). I have two custom taxonomies with one term each: Inner Part Categories Eye Symptoms Categories (Man) Broken Bone ...
5
votes
2answers
3k views

WP JSON REST API (Ryan McCue) how to query posts with specific meta data with 'AND' relation?

I use Wp_query class to query my posts. 15 posts are in a template fetched on page load and their filtering works fine. Infinity scroll fetches for other posts using JSON restful services. The filter ...
0
votes
1answer
79 views

Best place to keep files that are called by cron jobs?

I am interesting in setting up a Wordpress Website which needs to keep updating certain custom database tables after fetching data from RESTful Web Services, lets say once in a day. I can achieve ...
8
votes
3answers
5k views

Building a custom REST API

I have a WordPress.org site which takes user input, searches a custom database and displays the results of the query. I have this working using the wpdb class. Now I'm trying to get this working for ...
0
votes
1answer
570 views

WP API DELETE request from jquery ajax [closed]

I'm using the rest json API plugin http://wp-api.org/ to create a small application. I'm trying to delete a custom post entry with jquery ajax but something is missing, here is my code: ... //make ...
0
votes
2answers
516 views

Call Web Services on post first publish

I want to call some web service when i publish a post. I want to add a checkbox so as to decide whether to call or not call after publishing. I have found the code to call both REST and SOAP web ...
0
votes
0answers
60 views

Is it safe to use PUT and DELETE requests

I am building my new shiny plugin and since I've read about REST etc.I wanted to do things right and implement PUT and DELETE requests, and not just use POST and GET like I did until now. But now I ...
7
votes
2answers
1k views

Using Backbone with the WordPress AJAX API

I'm attempting to build out a simple TODO plugin using Backbone and have run into an issue with the AJAX API. In order to get the correct AJAX call back you have to pass in the "action" parameter ...
2
votes
1answer
489 views

Is there a hook to process a backbone restful PUT request inside wordpress?

I play around with Backbone.js (Great !) and want to synchronize my model data with the wordpress ajax api (3.6.1) on the server-side. Adapted to this http://addyosmani.github.io/backbone-fundamentals/...
0
votes
0answers
81 views

Is it possible to make Wordpress as a RESTful app?

I'm planning to create a Wordpress plugin that accepts data via cURL and sends a JSON reply. The plugin will save the data in the database upon receive so there has to be some authentication and will ...
14
votes
1answer
2k views

Using the Rewrite API to Construct a RESTful URL

I'm trying to generate rewrite rules for a RESTful API. I just want to see if there is a better way to make this work than having to write out every possible rewrite combination. Ok so I have 4 ...
5
votes
1answer
493 views

Including Wordpress in RESTful API

I'm using a great little open-source product called Restler to provide a RESTful API to a Wordpress application. In order for this to work I want to be able to load the Wordpress environment within a ...
6
votes
3answers
4k views

How to add category to: 'wp-admin/post-new.php'?

I want to have a link to create a new post that sets the category also. I have tried wp-admin/post-new.php?post_category=12 and wp-admin/post-new.php?cat=12, but neither worked. I also tried using ...
0
votes
2answers
266 views

AJAX requests within templates

I'm trying to come to an accurate decision here about safe ajax requests from a template. The thing about AJAX that always scares me is that the called script location is public: http://www.mydomain....
7
votes
3answers
6k views

SSO / authentication integration with external 'directory service'

I'm about to start working on a prototype for a client - and one of the required features is integration with an in-house user authentication / registration system. This system will act as the ...