The json tag has no wiki summary.
10
votes
2answers
610 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 ...
3
votes
1answer
273 views
Why does WordPress use serialize rather than json_encode for the options table?
I have a basic understanding of serialize (I come across it often when I'm migrating WordPress installs) and I just discovered json_encode.
Given that serialize causes so much trouble with replacing ...
3
votes
3answers
167 views
WordPress function that makes HTML safe to be sent via AJAX request
What is correct way to send HTML back to an AJAX request in WordPress?
I currently have this:
add_action( 'wp_ajax_nopriv_get-location-info', 'sc_locations_get_location_info' );
add_action( ...
2
votes
1answer
508 views
WordPress JSON output
Update: I've changed the code as following
$cats = get_categories();
$output = array('categories' => array());
function collect_posts(){
$args = array( 'numberposts=' => 9999, 'category' ...
2
votes
1answer
629 views
API JSON Data in WordPress
On the Google developer API page, it talks briefly on retrieving a dynamic list of fonts using JSON/JavaScript.
I was wondering how would I be able to pull the web fonts API into my Wordpress theme ...
2
votes
1answer
103 views
fetch_feed: retrieve entries in the appearing order, not chronologically
I'm using WP function fetch_feed to retrieve a feed and display its items.
<?php
/* include the required file */ include_once(ABSPATH . WPINC . '/feed.php');
/* specify the source ...
1
vote
2answers
426 views
Can't connect to my Wordpress website using Windows 8 app?
Im trying to connect to my Wordpress site (self hosted) through the Windows 8 app. First, after giving the Wordpress.com account details, it show my site and ask me to Authorize. after authorizing, it ...
1
vote
2answers
60 views
Why does running get_the_excerpt() when generating JSON file take 28 seconds vs. 599 milliseconds without it?
I am using the following code to generate a JSON feed. I need to extract the excerpt from posts, but when I run get_the_excerpt() it takes 28 seconds (yes SECONDS!) to run on my local server versus ...
1
vote
2answers
503 views
WordPress is stripping escape backslashes from JSON strings in post_meta
I thought I was making my life easy and being future-conscious by saving some content as bits of JSON in custom post_meta fields. Unfortunately, WordPress doesn't agree and is making my life ...
1
vote
2answers
226 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 ...
1
vote
1answer
434 views
How to encode post content as JSON?
I`m trying to construct a json object but are having difficulties with the_content since it returns newlines, which causes the script to fail. The error messages received is: Uncaught SyntaxError: ...
1
vote
1answer
108 views
Pass data from wordpress to javascript in JSON
Currently using this simplified code to pass data from WP to JS.
function add_map_data() {
$objName = "MapData";
$array = array(
"MapViewLatitude" => "51.505",
...
1
vote
1answer
234 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
1answer
582 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 ...
1
vote
0answers
293 views
How to parse date format using JSON API plugin 1.0.7? [closed]
I'm using the JSON API plugin to display my blog posts on my mobile website. I've got everything working as I'd like, however the the date displays in this format:
2012-03-21 20:03:30
However, ...
1
vote
2answers
228 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
2answers
74 views
json_decode does not work on Wordpress
I'm trying to convert a json string back into an array in wordpress. Here is the json string that I'm getting back from the database:
[
{
"item_title": "Kindle Fire HD 7\", Dolby Audio, ...
0
votes
1answer
49 views
wordpress is adding a second backslash when I use addslashes
I don't know why but it seems like wordpress is adding a second backslash when I'm using the following functions:
addslashes($str_with_single_quotes)
...
0
votes
2answers
260 views
Wordpress REST endpoint with JSON for Mobile App integration
Is there some REST API that Wordpress supports, out of the box or through any plugin that exposes the same information exposed through the normal pages? (I.e. latest posts, filtering by categories ...
0
votes
1answer
493 views
Custom JSON feed rewrite
I'm trying to implement a feed of information from an Event custom post type in JSON format, to be used in a FullCalendar implementation, pretty much as described here. The one thing I wanted to ...
0
votes
1answer
91 views
Twitter feed - Failed to open stream [closed]
This works, however I keep getting a failed to open stream every so many random refreshes/page views. I've also tried this code on two different hosts with the same results. I've also tried using ...
0
votes
1answer
46 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"].
...
0
votes
1answer
70 views
XML to Json code issue
I've written a script to display all WordPress posts organized by category in XML format.
Code was
// get all the categories from the database
$cats = get_categories();
header('Content-type: ...
0
votes
1answer
128 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
24 views
Is there a way to force Featured image to show as attachement?
When adding an image as a featured image to a post - if the image is an existing image in the Media Library, then the image is not added as a true attachment but as a thumbnail, shown like this in ...
0
votes
0answers
55 views
Wordpress + PhoneGAP [closed]
I'v been working around on solution to manage Wordpress user sessions with phoneGAP, un-top of that i must limit the content being shown and also the number of active session per user. Some of the ...
0
votes
1answer
56 views
JSON API not showing full content
I am trying to create a Windows Store App using IdeaPress (https://github.com/ideanotion/ideapress/issues), which relies on the JSON API Plugin ...
0
votes
1answer
46 views
Jetpack API for Wordpress Network
Wordpress provided a lovely Json API with Jetpack.
I cannot seem to to find a way, or documentation on getting data from a multisite wordpress install?
It seems to fail on sites like ...
0
votes
0answers
48 views
Save Google geocoded address to database?
In my WordPress admin I have an address field for each post (custom post type).
The address is just a string.
I need to find the country and region for each post, which I have been doing somewhat ...
0
votes
0answers
16 views
Worpress json api plugin - calling from jQuery [duplicate]
I am using JSON API Plugin for wordpress. It generates a json file from my wordpress content at http://grmmph.com/?json=1.
It seems to work fine if from the link above, however when I am trying to ...
0
votes
1answer
28 views
Generate aggregated feed from member blogs
I currently manage a multisite installation with 7 member blogs. We need to produce a combined RSS feed of news from all 7. Currently we use Feedwordpress to syndicate 6 blogs into blog number 7. This ...
0
votes
1answer
280 views
How to list categories and subcategories in JSON format?
I need to integrate this plugin with my WordPress site, and the categories must be in this format:
"Option 1": {"Suboption":200},
"Option 2": {"Suboption 2": {"Subsub 1":201, "Subsub 2":202},
...
0
votes
1answer
140 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
1answer
73 views
Adding a time stamp on post view
Hi there we are using this ajax function to update the views of our custom "posts"
if( !empty( $_REQUEST['action']) && $_REQUEST['action'] == 'update_view_count' && ...
0
votes
0answers
86 views
Facebook. Fetch user photos and post them to blog on the user side [closed]
So I'm looking for some plugin or solution to implement such function. Fetch facebook photos (using json I guess) and post them to the blog.
0
votes
2answers
115 views
Syntax for a function in order to get post's title in JSON encoded response [closed]
I use the following code in functions.php in order to obtain all the images attached to a post so I can retrieve them via AJAX.
<?php
function get_all_images($post_id=0, $size='bigger', ...
0
votes
3answers
2k views
Printing out JSON array returned [closed]
I have the following JSON array:
[{"occurences":"1","post_title":"Test 1","ID":"16"},
{"occurences":"1","post_title":"Test 2","ID":"19"},
...
-1
votes
1answer
37 views
How to post data to a word press site in case of a mobile app
I have a site made with word press. I came across a requirement where a developer tries to log in from an ipad or iphone into word press site. Is there any plugin to achieve this ?. there is a ...
-1
votes
0answers
19 views
Use JSON API authentification ! How to use it?
wordpress.org/extend/plugins/json-api/
github.com/mimetic/wp-json-api-auth
Hi,
i want to use JSON API Auth to protect the json output but i don't know how i can use it.
I enable the controller in ...
-2
votes
1answer
177 views
How can I json_encode the output of my function?
How can I json_encode the output of this function I use to get all attached images of a post?
<?php
function get_all_images($postid=0, $size='bigger', $attributes='') {
if ($postid<1) ...
-3
votes
0answers
27 views
JSON API custom fields not showing full content
I have custom edited JSON API plugin and it looks like that
http://domain.com/api/posts/getByCatId/?dev=1&cat_id=7
and I get only 5 items but I have much more in database.
I try
Open file ...

