The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
661 views

Retrieving JSON data in ajax request from media uploader

I'm having some problems getting my JSON data that's being passed via an ajax request. I'm trying to implement the media uploader into a plugins settings page. I've got it functioning properly using ...
-1
votes
0answers
11 views

rest_api_init not registering namespace or route

I've been battling with adding an endpoint to my code. Several endpoints are registered and liste in the namespace list at /wp-json/ "namespaces": [ "wp/v2", "oembed/1.0", ...
0
votes
1answer
443 views

WP REST API. Configuring JSON routes

I am working through the documentation on wp-api.org/ and trying to get my head around this awesome plugin, but I have a question that I can't find the answer to anywhere, so thought I'd ask...it's ...
1
vote
2answers
39 views

Mass importing json data into custom fields (postmeta)

I am in the process of importing large amounts of data into a custom post type that has several custom fields (postmeta fields created by Advanced Custom Fields). I am using the following function to ...
0
votes
0answers
9 views

WP All Import: Can I use dynamic URL:s to import item specific data

SCENARIO We're building a site that imports work-adds from a third party through a REST-API which generates 2 endpoints: one for all ads, a second for additional info per ad (e.g. ...
0
votes
0answers
24 views

Fetch api json data pagination

I'm developing a plugin that needs to fetch all font families list from Adobe Typekit API. I'm using wp_remote_get to accomplish this. $font_list = array(); $fonts_lib = wp_remote_get( ...
0
votes
1answer
3k views

Parse wordpress blog data using json api and ajax

I have seen lots of responses to how to extract data from wordpress blog posts using the json api plugin. Many uses $.getJSON, $.ajax, .responseData.feed.entries, success function() etc. What is the ...
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 ...
0
votes
0answers
14 views

Strategy for organizing JSON/tabular data the wordpress way?

Situation: Have to import about 20-100 JSON objects into wordpress, which will NOT be displayed at all, but will be processed with other data for view. Example JSON input: { "headers": [ ...
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
49 views

How Do I Add User Custom Field to REST API Response?

I am writing a WordPress theme that adds several custom fields to the user profile using the following function function add_contact_methods( $profile_fields ) { // Add Social Media Fields ...
0
votes
1answer
84 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
61 views

WP REST API format response

I'm using 'WP REST API Version 2.0-beta12" by http://wp-api.org/ to use REST API, available via HTTP of my site's data in simple JSON format. I have formatted my json output to limit reponse field ...
3
votes
1answer
72 views

Cannot access elements of json object

This is more of a json question but since it is within wordpress and is being processed by admin-ajax.php I thought it suits this forum best. I have created a standard ajax form procedure as shown ...
0
votes
1answer
34 views

Dynamic data table from external json feed

First of all, while I'm fairly comfortable with code, I'm also quite new to Wordpress development, JS, and PHP so please forgive me if this is not explained very well, or a real rookie-type question. ...
0
votes
1answer
61 views

body_class REST field in WP-API

I'm building a site with WP-API (v2). I'm attempting to add a REST field according to documentation that includes anything from body_class. However, body_class is returning either one class (one ...
1
vote
2answers
52 views

Creating a Multi-Level Associative Object Using AJAX

I'd like to create a Multi-Level Associative Object on $.post method using WordPress, in order to make my code cleaner. The problem is, I don't know how to get those values to manipulate on the ...
0
votes
1answer
68 views

Why aren't tags and categories added in post request to WP Rest API

I'm using V2.0 and trying to create a post using the /posts endpoint. Here's the payload being sent with my request: var payload = { title : "some title", format : "link", tags: ...
-1
votes
1answer
52 views

Output pure JSON wordpress

I have written a Wordpress plugin in PHP and I want to output JSON without any wordpress theme html and other boilerplate. But I do need to interact with other plugins and the WP-Settings information. ...
-2
votes
1answer
23 views

Store images and videos category wise and fetch them in json format

I am try to store images and videos category wise , I used "Enhanced Media Library" plugin to categorize media. Now I have to fetch media category wise and show in json format. I am using JSON API, ...
1
vote
1answer
29 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: ...
0
votes
0answers
15 views

Choosing what Shortcodes should render

So I am working on a mobile app that pulls from a WordPress JSON API, I've coded our own end point and it's delivering content just fine. I need a way to be able to pick and choose what shortcodes ...
0
votes
0answers
23 views

Connecting a wordpress site to an AngularJS APP

Currently I have a application that needs a blogging system added. The application is built with an AngularJS front-end and a python/Django back end. I wanted to use wordpress as the blogging system ...
8
votes
3answers
4k 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
72 views

WP Rest API and json_decode()

I'm getting familiar with the WP REST API 2 plugin and I started following the amazing directions from Torque's Guide. Everything seems pretty clear but I'm having trouble understanding this error ...
0
votes
1answer
41 views

Plugin Development: Storing and Manipulating Data That Fits JSON in Database

I am new to Wordpress plugin development but not web development in general. I have a website whose functionality I am trying to port over to Wordpress for a client that needs it in a custom plugin ...
0
votes
1answer
33 views

How to syntax Json output for translation?

Example I have this outputting decoded JSON $data and want to make contents translateable in wordpress. <?php echo $data['hair']['type'] )?> So in english this would output "Brown hair", but ...
0
votes
0answers
33 views

How to fill up in tags?

i have some problem to fill up the data Here is my code $.getJSON( url + input + "/keywords?" + apikey, function(tmdbdata) { $.each(tmdbdata, function(key, val) { if(key == "keywords"){ ...
1
vote
0answers
38 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
36 views

how to display term name angularjs

I've recently learned about angularjs and I am trying to display a term associated with a specific custom taxonomy. So far this is what I've tried in my partials file - <div ng-repeat="post in ...
1
vote
1answer
216 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 ...
0
votes
2answers
2k views

Call Ajax URL in Plugin

Plugin Class File: function __construct() { add_shortcode('user_registration_form', array($this, 'shortcode')); } public function hook(){ add_action( ...
1
vote
2answers
828 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 ...
0
votes
0answers
27 views

Best practice for pulling in data from simple 3rd party API

We have a simple template in our WP site that will display a list of companies. Each company has 4 attributes (ID, name, logo, category/industry). We have been provided with an outside api ...
0
votes
0answers
29 views

Define JSON file values by admin user

I have couple of long JSON files with predefined keys and want to have the values updated by the admin user. So I'm looking for a way where the developer (SuperAdmin in my case) can upload a JSON file ...
1
vote
2answers
308 views

Unset data in custom post type WordPress API (wp-json)

I can already unset (remove specifics from normal posts) in the json returned from the WordPress API. I actually use the following below from this example: ...
0
votes
1answer
106 views

How to use json_decode a post_meta value? [duplicate]

I have used get_post_meta($post->ID) to get all custom fields for my post since I have many of htem. Some of them were checkbox values and var_dumping the variable gives me this array (size=1) 0 ...
1
vote
3answers
179 views

How to use the new Wordpress 4.4 JSON API?

Until today I have used the plugin "WP REST API (WP API)". Now I want to use the built-in API but can't find any documentation on it. Any idea?
0
votes
0answers
26 views

Custom Permalinks for JSON Feed

What file-name would I make to allow the following permalink. Wordpress/Custom-Archive/ID/Title I have created the Custom-Archive with achive-slug.php and the ID seemed to work under that as well ...
1
vote
1answer
1k views

Intergrating agile carousel to wordpress: how to write the ajax_callback function

json is totally new to me how to write an ajax_callback function for agile carousel to work in wordpress? Below is the jason data format that I need to write as php arrays for it could be parsed by ...
3
votes
1answer
185 views

importing third party json feed as custom post type [closed]

I have a third party json feed http://feeds.artlogic.net/artworks/artlogiconline/json/ that i need to use to import data in wordpress as a custom post type called "artwork". Are there are handy ...
0
votes
1answer
50 views

Querying Posts Using JSON API

I am looking at the WordPress JSON API Plugin. What I'd like to do is query all posts in a custom taxonomy term called wales. I have been able to get all posts in the post type listings using this url ...
1
vote
1answer
291 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. ...
0
votes
1answer
58 views

return content section as json in wp rest api v1

I am using WP REST API. I want to get the posts from my blog and show them in my android app. So, everything is OK, but i need to ask a question to make sure about something: when i call posts in the ...
0
votes
1answer
242 views

Remove a field from json in wp rest api v1

I want to create an android app for a WordPress blog using WordPress rest api. For optimization I want to remove content field and some other fields when I get all post to show them in my main list ...
6
votes
3answers
5k views

Implementing Isomorphic JavaScript (React JS) in Wordpress?

I'm about to start with a new project and would like to incorporate React as I want to learn more about it and this specific project would be perfect to get started as it's not that time sensitive and ...
0
votes
2answers
90 views

How to get those data using with ajax json?

The following coding is the out come of an other page php echo user_list.php: $myarray=array(); ... ... $myjson = json_encode($myarray); echo $myuser->searchUser($myjson); and the result of ...
0
votes
0answers
151 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 ...
0
votes
2answers
252 views

Wordpress Ajax JSON success return no being recognized

I'm working on a contact form for a website using an jQuery Ajax call method that then uses Wordpress's building in admin-ajax.php to submit the form's values, send them to an email address via ...
0
votes
0answers
107 views

Get private posts by Wordpress API

Now i'm using Wordpress API for my iOS app and I have a problem with get posts API: I want to get all visible posts of a site ( all public posts, event posts with password ) but I can get publics post ...