The tag has no usage guidance, but it has a tag wiki.

learn more… | top users | synonyms

12
votes
4answers
3k views

How to cache json with wp-super cache

In a new project we are using wp-super-cache (the client's preferred plugin) to create the static html files for custom content types. But we are trying to figure out if everything is being cached ...
7
votes
3answers
2k views

Help with 4.6. Attachment response object in JSON API plugin

I am a big fan of the JSON API plugin. The developer did a great job and I thank him very much. I am learning how to work with json and jquery and am trying to limit the information I get back from ...
6
votes
1answer
747 views

Show popular post in another php website via WP REST JSON API

I need to show popular & recent posts in another php web site under the same domain. example: domain.com -> main website (php, mysql) domain.com/blog -> wordpress blog Need to show popular, ...
4
votes
4answers
3k views

WP REST API fetch posts from post type

How can I get all the posts from a specific custom post type with WP REST API (either v1 or v2)? I'm very new to this and trying to understand how to do that. I am currently using WP REST API v2 and ...
4
votes
1answer
270 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 ...
3
votes
3answers
3k views

Sorting results from JSON-API on custom fields

Is there any way, out of the box, to sort results from the JSON-API plugin based on values in custom fields? The request is paged, so the results will need to be sorted server-side. I have an http ...
3
votes
1answer
2k views

Wordpress wp-json API - Custom Post Type returns 403

I've been trying for a full day to get a really basic install of the WP-API to answer to a custom post type (in this case called 'transactions'). The post type is set up and fully public, and it's ...
3
votes
1answer
3k views

Wordpress json api taxonomy index method

In edition to this post below: wordpress json custom taxonomy problem How to write a method for getting categories withing a custom taxonomy, similar to Method: get_category_index in core json api ...
2
votes
2answers
381 views

What is the official way to consume the Wordpress API? (api.wordpress.org)

Was wondering if anyone knows here if the API at api.wordpress.org is free to use without keys. I haven't really found any information about key registration. I'd like to use it to make a few ...
2
votes
1answer
2k views

POST to a REST API from a wordpress form

I dont want to use a REST API to publish to wordpress. I want to create a form on a wordpress page which will send a POST to an external REST API. Users will put in their information, and perhaps ...
2
votes
1answer
148 views

Retrieve all users from wordpress database via REST/JSON API

I've read that the WP REST API v2 retrieves only users that have made a post for the blog. I'm developing an iOS and Android app that needs to use the Wordpress registration. How I could retrieve a ...
2
votes
1answer
111 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 ...
2
votes
1answer
772 views

Add custom parameters to JSON API search query?

I am using JSON API plugin to query wordpress from a mobile app. Currently I have a theme on my wordpress site which works as a directory returning "near me" results when a search is made. This is ...
2
votes
2answers
821 views

How to get all events from 'All in one Events calender' plugin in JSON format?

I am using All in one Events Calendar plugin to add the events. It works fine in CMS. I would like to display the events data in mobile version. for this i used JSON-API for obtaining web-services in ...
2
votes
1answer
545 views

How pull wordpress blog data using Blogger API using python

Wordpress mentioned that it supports Blogger API (link). So, can anyone tell me how to use Blogger API (using python) v3 to pull wordpress public blogs data. Or, is there any wordpress API to pull ...
2
votes
1answer
361 views

Sharing templates with the JSON API?

Is there any way to share 'templates' between JS and Wordpress? For instance, this sort of modest seat-of-the-pants templating feels ok: var AJAXSuccessFunc = function(data){ // calling this on ajax....
2
votes
0answers
368 views

Authenticated request to WP REST API V2 returning 403 error on /users/me [closed]

I am using WP REST API Version 2.0-beta7 together with WP OAuth Server version 3.1.91 After authenticating with the User Credentials grant type, a request to /wp-json/wp/v2/users?access_token=[...
2
votes
0answers
617 views

Wordpress JSON API Extend to Create Users [closed]

I have the JSON API Plugin installed on my wordpress blog and it works like a charm. However there is one functionality that i really need. A method called create_user which should take parameters ...
1
vote
2answers
2k views

WP-API restfull JSON and post meta?

OK I'm using this plugin: https://github.com/WP-API/WP-API/ to turn my site into a rest full API and it's working great.. Then I'm using ths plugin to add custom post meta: https://wordpress.org/...
1
vote
1answer
2k views

How to replace or display the special characters from JSON API plugin [closed]

I started using the JSON API plugin. It works good ! But the problem i am facing is, If i enter any text containing special characters through CMS The output is not same as the given text. Why this is ...
1
vote
1answer
1k views

How to handle shortcodes when using the JSON API

I'm wrangling a little logic problem: I'm making a single page WP theme which uses the JSON API for the content and Mustache style templates for the presentation... However, shortcodes? What would be ...
1
vote
2answers
1k views

Get WP Navigation Menu from REST API V2

I'm trying to get the navigation menu from JSON response using WP REST API v2 plugin. There is no navigation menu plugin extension for the REST API v2, but only for V1. From codex WordPress Post ...
1
vote
1answer
129 views

Json api does not return all metadata

I am using this plugin https://wordpress.org/plugins/json-api/ to create a new entry is saved correctly in the database all the wp_postmeta customfield table, but when you run api/get_post/?post_type=...
1
vote
1answer
37 views

JSON API plugin, Get posts by category return no post

Im trying to get the posts by category. using this URL: /api/core/get_category_posts/?slug=cat2 But responding this: {"status":"ok","count":0,"pages":0,"category":{"id":3,"slug":"cat2","title":"...
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 ...
1
vote
1answer
190 views

How do I “get the next 10 posts after post_id == x”?

I am building a mobile application that is pulling the json feed from a blog. I can easily query to get the latest 10 posts for example. But next, I want to be able to query the next 10. This presents ...
1
vote
3answers
5k views

Create User using JSON API

I am using JSON API for get the post list from my App. I need to create user(Register new user) from App. May I know how to add new function to Wordpress JSON-API? Regards, Alex
1
vote
1answer
5k views

Filter by custom field (meta_key) using JSON API

Hi I'm using the great JSON API for Wordpress and would like to filter my custom post types by a specific custom field (using the meta_key and meta_value params). The query in my URL looks like this ...
1
vote
0answers
8 views

Is it safe to save a cookie in my mobile app internal memory and use it for further authentications?

I am planning to generate an authentication cookie with the JSON API and save it in my app memory with : https://example.com/api/user/generate_auth_cookie/?nonce=+4d080ff7b8&email=user@gmail.com&...
1
vote
0answers
132 views

WP set auth cookie using Ajax is not saved to browser

We are creating an external dashboard that uses Wordpress data, obviously, we use WP REST API v2 We want total separation from the traditional WP Dashboard, but we also want to log in user "behind ...
1
vote
0answers
163 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....
1
vote
0answers
47 views

Include related custom fields from one post type in another post type's JSON feed

I have a custom post type called Offers, and in this post type is a custom field called Store, which is a relationship field type to another custom post type Stores. This has been created using the ...
1
vote
0answers
454 views

Can you use a WordPress permalink to get a post with the JSON API?

New to the WordPress JSON API (https://wordpress.org/plugins/json-rest-api/) and what I'm trying to do is get a post using it's permalink, not the id. So for instance, it would be /wp-json/posts/my-...
1
vote
0answers
671 views

mod_rewrite doesn't work as I want even with JSON API Plugin disabled

I've been asked to upgrade the codebase of a Wordpress website, which exposes a small set of APIs using JSON API plugin. The Wordpress installation is not in the root, but in a secondary folder: /...
1
vote
2answers
2k views

Getting Custom Fields from WordPress JSON API

I'm using the plugin (https://github.com/WP-API/WP-API) to get JSON Data from WordPress, but I'm stuck on something, I've a custom post type, events, with which many custom fields is attached to, such ...
1
vote
1answer
2k views

Get subcategories with JSON API plugin

How to get subcategories with JSON API wordpress plugin? I see how to get categories, but what is the way to get categories with subcategories at the same time? How should I modify the existing code? ...
1
vote
2answers
393 views

Hook Into the_content Filter For JSON API Only

I'm trying to figure out a way to remove the shortcodes from my JSON output which I'm using the Wordpress JSON API for. I need to remove the shortcodes from the content before do_shortcode is applied ...
1
vote
1answer
4k views

Create post using JSON api plugin

I am working on a project where the user writes their content on one wordpress blog (as a draft) but wants it published on their own wordpress blogging site. This seems strange but it is the core ...
1
vote
0answers
1k views

Why is json_decode failing?

I'm trying to determine if this is related to my having the latest version of PHP on my server while using the latest version of Wordpress. Or if I'm just doing it wrong: Here's my function that is ...
1
vote
2answers
1k views

wordpress JSONAPI introspector always limits number at 10?

I'm a little new to Wordpress and the JSON API so forgive me if this is a newbie question but i'm trying to get all of the posts of a few different custom post types and return them as JSON via my own ...
0
votes
1answer
790 views

JSON API not showing full content

I am trying to create a Windows Store App using IdeaPress, which relies on the JSON API Plugin. Unfortunately requesting recent_posts returns just content up to the <!--more--> tag. I'd ...
0
votes
1answer
50 views

WP Rest API - How to get featured image

I'm very new to this API, in fact I've only spent couple hours on it so far. I've done my research but cannot find anything about it... The issue is, I can't seem to get the featured image of a post. ...
0
votes
1answer
95 views

JSON API - search by custom taxonomy

I am trying to get the posts base on some parameters. My JSON API query is as follow. http://www.example.com/api/get_posts/?post_type=job_listing&page=10&count=5/ Here is my JSON result for ...
0
votes
1answer
485 views

WP JSON API meta_query not working

In the code example below I'm using the the post title (name) as the field to store the email address while the password is in a custom field. The following query will pull the correct user but it ...
0
votes
1answer
53 views

Fetch CSS of posts

I am using JSON API plugin for fetching recent posts.Now I want to show them in my web as they are being displayed in wordpress.How can i get css of wordpress theme?
0
votes
2answers
132 views

Are all ID's used unique?

I'm using JSON api plugin to pull data from wordpress into an app I am making. I need a unique identifier to make sure I don't have any duplicates WHILE also using the identifier as a way to sort from ...
0
votes
1answer
126 views

uneven behaviour create a post in using json api with white spaces

$url = "http://192.168.201.214/wordpress/?json=posts/create_post&dev=1&nonce=".$_POST["nonace"]. "&title=".$_POST["title"]."&content=".$_POST["content"]."&slug=".$_POST["...
0
votes
1answer
210 views

Fetching ten ten records from JSON API in word press

I am using JSON API for getting web services.. I have 80 records in my wp_posts table . I need to display 10 , 10 records so that my mobile app will be faster. I used the following method in this ...
0
votes
0answers
9 views

Use 'mobiles meta info' to create user ? WP is backend for the app. JSON API

Using WP as a mobile App's backend, using the JSON API. Goal: 'Creating' a user without password, while saving certain meta info about them. Then allow created users to do an allowed action. The ...
0
votes
0answers
19 views

how do i add an array of objects or an extra field to a wordpress json api core controller?

Is there a way to add an array of objects to a core controller of the json api plugin the core controller i want to modify is 'get_category_index' and it returns these objects id post_count name ...