The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
7 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) { ...
1
vote
1answer
976 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 ...
0
votes
0answers
10 views

Create and Update a Json file

I have been tried merge two piece of code, but I'm not a developer. It's a little hard for me =( I need build an auto update .json file with some custom fields for a personal project. I have this ...
0
votes
0answers
12 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
465 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 ...
-3
votes
1answer
45 views

How to print the output of the json?

I have this code :- function retrieve_comments(){ $myPost = $_REQUEST['post_id']; $output = get_comments('post_id='.$myPost); if(is_array($output)){ ...
0
votes
1answer
2k 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
1answer
282 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
568 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 ...
2
votes
2answers
1k views

AJAX returns response 0

I'm trying to get user profile values using an AJAX call, but the response is always 0. Here's my PHP: wp_enqueue_script( // Add JS to <head> 'cc-author-change-post-author', ...
0
votes
0answers
62 views

Import facebook feed as a post in wordpress with 100,000 of posts

I need to import facebook feed of one of my facebook pages as posts to wordpress site using facebook graphic API. For this purpose I am fetching the json file with all the posts from facebook in it ...
0
votes
1answer
20 views

Control character encode after using jquery autocomplete

I'm using jQuery UI autocomplete for three different form suggestions. Everything is working good, the only issue is that titles suggested aren't utf-8 (I think): Instead of "Bla bla - Bla" I have ...
0
votes
1answer
158 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
1k 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
1answer
647 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
2answers
66 views

Call Ajax URL in Plugin

Plugin Class File: function __construct() { add_shortcode('user_registration_form', array($this, 'shortcode')); } public function hook(){ add_action( ...
0
votes
0answers
9 views

Generate attachement to Post from featured image

I am using WP-JSON API Plugin. If i choose an image as featured that is allready uploaded in my media library it does not generate attachements Object in JSON like the example bellow. ...
0
votes
1answer
55 views

Return scheduled posts with WP REST API

I'm using WP REST API plugin for a custom web application and I need to get access to the scheduled posts of the target wordpress website. However I can't find any parameter or filter to achieve this ...
0
votes
2answers
310 views

AngularJS with route and JSON API

I tried to use AngularJS with the plugin JSON API. I have no error but the route doesn't work, and the page doesn't print the partials/... ? I changed the permalinks to %postName%. I use MAMP and my ...
0
votes
0answers
37 views

Insert XML data into the existing posts

I have nba videos news website and I want to insert xml data into the existing posts. For ex I have this post Pacers vs Timberwolves Match report and I want to import data from this xml: ...
0
votes
1answer
34 views

Can't add classes using jQuery from a JSON string with get_body_class()

In order to refresh the classes on the <body>element after an AJAX call, I am writing at the top of my AJAX response the following in JSON: $o[ 'classes' ] = get_body_class('project'); I can ...
0
votes
0answers
31 views

Dump all posts to file via WordPress JSON API?

I would like to dump all posts to a JSON file so I can include it in my mobile app project. That way, the app can work offline for the most part, then I just have to query new and modified posts from ...
0
votes
1answer
63 views

Ajax specific template not loading in replacement of index.php

Following my previous post (Full-Ajax Theme: parseJSON error while building a JSON object from a Wordpress custom template) regarding a few problems concerning JSON (now resolved), I am trying to load ...
0
votes
1answer
66 views

Full-Ajax Theme: parseJSON error while building a JSON object from a Wordpress custom template

Trying to make a full-ajax navigation on my new portfolio, I read online on a few different blog that building the templates using JSON would be easier in order to treat the datas however I want. It ...
0
votes
1answer
18 views

Retrieve custom taxonomies

I want to make plugin to make custom taxonomies for custom post type like wp-admin/edit-tags.php?taxonomy=store_cat&post_type=store_kyd_app and register this taxonomy at stores.php public ...
0
votes
1answer
74 views

Retrieve list of taxonomies in json

I have custom taxonomies like that /wp-admin/edit-tags.php?taxonomy=my_cat&post_type=my_poet I want retrieve list of taxonomies in json add_action('init', array($this, 'json_handler')); I ...
0
votes
0answers
159 views

Loop through multidimensional array for values, then interest into mySQL table

I have a package of JSON that gives me something like this: [{"a":"5", "b":"9", "c":"3"}] I have a table with with three columns: a, b, c. I want to create entries into the table to match 'a', 'b', ...
0
votes
0answers
59 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
0answers
33 views

Using remote data in post/pages/widgets in Wordpress custom plugin by jSON

I have a URL like this: http://examplesite.com/manage/access?id=22&access_key=12345678 This is a jSON file. I want to create custom Wordpress plugin and put this access key in the plugin. When I ...
1
vote
0answers
227 views

Submit comment via JSON from Android device

I have a Wordpress blog together with a little Android App, developed by myself. Now I want to expand my app a little. My goal is to implement a kind of live ticker. The function is as follows: On my ...
3
votes
1answer
212 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, ...
1
vote
3answers
17k views

Can't get a JSON object in response to an ajax request with wp_ajax

I have a problem with WordPress and ajax. This is my javascript part (I trimmed it a bit): var posts = $.ajax({ type: 'POST', url: ajaxurl, async: false, dataType: 'json', data: ...
0
votes
1answer
23 views

Custom url in wordpress

I want to make custom url and handle it from my plugin Ex:- domain.com/myplugin=endpoint&id=num&.. i want to return just json data not template Thanks
0
votes
1answer
534 views

Save JSON object attributes to custom metabox

Case: I use a imagepicker.js script to create a image picker for my custom meta box. But this doesn't work for WP 3.6 anymore, So i'm trying to create a image picker metabox with the new media ...
0
votes
0answers
53 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 ...
0
votes
1answer
39 views

Result from wp_send_json adds line feed

I've got a local Windows stack running AMPPS at 5.4.35 and my code runs fine but when I deploy to my Bluehost server running PHP 5.4.28 the execution of wp_send_json is different. wp_send_json( ...
0
votes
0answers
839 views

Uncaught TypeError: Cannot read property 'ajax' of undefined

I'm trying to show data from a JSON object in the content section of a WordPress website. The following static HTML works like a charm. <!DOCTYPE html> <html> <head> ...
3
votes
1answer
1k 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 ...
3
votes
6answers
522 views

I want to create a custom slug in WordPress and output JSON. How do I do this?

I have an array: $cats = array('Hobbes', 'Simba', 'Grumpy Cat'); I would like to create a custom endpoint called "http://example.com/cats". Whenever you visit this URL, have it output the array as ...
3
votes
2answers
441 views

Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”

I'm using AngularJS's $http function to send my payload to WordPress's admin-ajax.php subsystem, but it seems the latter only accepts x-www-form-urlencoded data, instead of the application/json ...
1
vote
0answers
684 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
42 views

Is it possible to pass variables to WordPress externally?

I would like to know if it is possible to pass json variables from a form which is located outside WordPress? This is the situation: The user fills a form located on x server. Then his answers are ...
1
vote
1answer
33 views

JSON - Permission Error?

I have two dropdowns to filter posts on a website. The second dropdown populates based on the selection of the first, ie: [CATEGORY] + [SUB-CATEGORY] = SEARCH The problem is that occasionally the ...
0
votes
1answer
181 views

AJAX Call in Plugin Returns More than JSON

I have a plugin tat extendeds Gravity Forms consisting of one PHP file and a JS file. The PHP file can be found here: http://pastebin.com/VUX5AfLP The JS File can be found here: ...
0
votes
3answers
159 views

Create a file format (csv,json,etc) when save/update a Post

I need create a file (any type: json, php, csv, txt) when I create or update a post from WPadmin. The format structure would be: ID, "operation to execute" (new post, update post, delete post), ...
0
votes
0answers
114 views

Ajax JSON response works for admin

I try to add custom post type object from front-end form with AJAX, right JSON response works only if i logged as admin, otherwise i get html code of main page, but object is added. js: var ...
0
votes
1answer
662 views

Adding inside wp-plugin jQuery script that receives JSON-formatted data, generated by php-function inside this plugin

I'm trying to add Highstock chart in my plugin. It requires input data in json format. But I have some troubles with default json parser in jQuery. I've already read this article, but still can't ...
0
votes
0answers
55 views

Cannot save json in wp_insert_post

This is my code. $offer_name doesn't get saved. $obj = json_decode($result, true); $i = 0; foreach($obj['response'] as $item) { for($i=0;$i<=$item['count'];$i++) { $offer_name= ...
2
votes
1answer
1k views

Why use wp_send_json() over echo json_encode()?

When sending a JSON response back to an AJAX request, why use the WordPress function wp_send_json() and not echo json_encode()? What is the benefit of using the WordPress function wp_send_json() over ...
1
vote
1answer
253 views

Displaying Content with WP Rest API

I have been spending some time working with the new Rest API. I understand what it is doing but I don't understand how the JSON is used to actually display the content on a page. I have been fooling ...