The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
407 views

wordpress plugin JSON API search within specific category

From the JSON API plugin doc I notice that I can get the post within some category http://abc.com/?json=get_category_posts&id=9 And I can also search the post http://abc.com/?json=...
1
vote
1answer
431 views

Upload a json file in php

I'm trying to upload a json file through PHP. This is the code that i have yet. if( isset( $_POST['upload'] )) { $target = "/"; $target = $target . basename( $_FILES['upload']['name']) ; ...
0
votes
1answer
24 views

Export all post from database to JSON only when the database gets updated

I'm trying to export all the published post of my database to a JSON file, in order to use it in JS. Here is the code: <?php /* Plugin Name: Export to JSON Description: Creates the JSON file that ...
0
votes
1answer
470 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 ...
0
votes
2answers
47 views

Have Wordpress generate a JSON of the content

This particular project is huge, both in data and in user access (personaly I wouldn't use WP but the client wants to). The problem is, I don't want the front-end to constantly access the database, ...
0
votes
1answer
407 views

Fatal Error in \wp-admin\includes\misc.php after failed WP update

I was recently approached by a client whose wordpress site had been hacked. The hack caused traffic from search engines to be hijacked to cuteonbags.com. I narrowed down the malware in question and ...
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 ...
0
votes
0answers
14 views

Displaying menu outside site with WP API Menu

I'm new to REST API (and JSON in general) and am wondering if there's a way to display a menu from one site (a public facing site) on a private intranet so the client only needs update the menu in one ...
0
votes
1answer
37 views

Redirects based on a JSON file

Having a JSON file, how can we set up WordPress to redirect the urls (if it's found in the JSON file)? For example: { "foo": "bar", "foo-1": "baz" } Then /foo will redirect to /bar and /foo-1 ...
0
votes
0answers
17 views

Wordpress theme error “Google Fonts JSON file does not found”

I am receiving this error at the top of my wordpress site on both the front end and the admin panel, after installing a theme named 'Camilla'. My wordpress site has what I believe to be the correct ...
1
vote
1answer
34 views

Importing JSON feed should the content be sanitized?

I've been doing a lot of research and had several discussions in chat about learning to take a JSON feed and add the content to a post in WordPress. In the past I would create a page template and ...
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 ...
0
votes
1answer
51 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. ...
1
vote
2answers
692 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 ...
0
votes
0answers
14 views

Example code of updating a Wordpress post from a 3rd party using WP-REST-v2

I wish to update posts on my Wordpress site via a 3rd party mobile app. It is enabled to work with Wordpress REST API. Firstly, is it possible to update a certain part of a post/page via REST API (ie....
0
votes
0answers
22 views

AJAX call to Vimeo API from WP admin

What I am trying to do is query the Vimeo API to populate some ACF fields in a custom post type. I'm loading this in the admin head for WP Editor, which grabs the Vimeo URL from the ACF field, and ...
0
votes
1answer
26 views

Run function when WordPress new multisite is created or ACF field is updated

I have created a function on the main site in my multisite network that loops through each site in the network, pulls the values from their options page in ACF, and saves the data to a JSON file. ...
3
votes
1answer
85 views

JSON not valid after json_encode posts

I'm having problems saving JSON in a custom table in my database. I pull some posts (+ connected posts) from the database and add them to an array. This is a part of my array: array(2) { ["post"]...
1
vote
2answers
88 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
20 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. site.com/vacancies/)....
0
votes
0answers
40 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( 'https://...
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
15 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
93 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
97 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
100 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
84 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
52 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
70 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
58 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 back-...
0
votes
1answer
96 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
74 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
32 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
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":"...
0
votes
0answers
19 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
26 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
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
124 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
47 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
39 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
36 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
47 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
41 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
247 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
3k 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
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 ...
0
votes
0answers
48 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
365 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: https://css-tricks.com/using-the-wp-api-to-...