The tag has no usage guidance.

learn more… | top users | synonyms

3
votes
1answer
2k views

How to get featured post title & image using JSON API?

Is there any possibility to get featured post title and image using the JSON API. I tried using this: example.com/?json=the_post_thumbnails&count=3 But instead of recent posts, I get featured ...
1
vote
1answer
416 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']) ; ...
1
vote
1answer
318 views

Wordpress JSON API remove posts from a specific category

I have installed Wordpress JSON APi plugin, the idea what I want to do is to retrieve all posts from a websites except a specific category for example with ID: 434. I need all posts except from this ...
0
votes
1answer
66 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
92 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 ...
3
votes
0answers
121 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 api,...
1
vote
0answers
44 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 ...
1
vote
0answers
136 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 ...
1
vote
0answers
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 ...
1
vote
0answers
404 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 ...
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 ...
0
votes
0answers
17 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
0answers
21 views

trying to write rest api in wordpress json

i am working with a company that is called cordial (online crm/marketing co) that uses rest api to interact with their system. I'm trying to create a rest / json interaction that will allow me to ...
0
votes
0answers
14 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
28 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://...
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": [ ...
0
votes
0answers
18 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 ...
0
votes
0answers
34 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"){ ...
0
votes
0answers
39 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 ...
0
votes
0answers
37 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 ...
0
votes
0answers
27 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 ...
0
votes
0answers
191 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 http://example.com/wp-json/...
0
votes
0answers
116 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 ...
0
votes
0answers
49 views

WP API Get Request Dynamically Load the_content

I have formatted my posts as follows, using the normal Loop: the_title the_date the_excerpt Using a "Read More" button onclick and the WP API v2 JSON data, how can I dynamically expand the post to ...
0
votes
0answers
187 views

Load data via xml api and display it in your posts and pages

it is possible to implement xml api data in WordPress site, i found a plugin that support only json https://wordpress.org/plugins/json-data-shortcode/, how to load data via xml api and display it in ...
0
votes
0answers
55 views

How to view W3 Total Cache for testing?

I've attempted to cache JSON endpoints in WordPress by following this post: http://wordpress.stackexchange.com/a/115384 // Modify the output buffer callbacks of W3 Total Cache to work with the JSON ...
0
votes
0answers
128 views

PHP > Scheduled Tasks > Sending daily email with dynamic API variables

I'm trying to write a PHP cron job that would call an API, return a set of numerical variables, calculate a second set of variables, and send an email to selected recipients with those variables ...
0
votes
0answers
62 views

update_post_meta with JSON string

Sorry for my bad English I need to write the function update_post_meta json in the meta_value. My code $s ='a:2:{s:9:"detailbox";O.......................... .:"format";s:0:"";}}}}'; ...
0
votes
0answers
49 views

How do I prevent an infinite-loop. wp_insert_posts + JSON

I'm downloading posts from JSON file with this code: $bands = json_decode(file_get_contents('json file url'),true); $arrayLength = count($bands); for ($i=1; $i <= $arrayLength-1; $i++) { ...
0
votes
0answers
109 views

How to get data from external api into wordprss post/page

how can i use an api into WordPress post i want to use the data from http://www.xmlsoccer.com/ its ip is on xml data also i want to add multyply apis on one single post if it is possible is there ...
0
votes
0answers
348 views

Wordpress ajax load more returns duplicated posts

I'm trying to load more posts from my custom post type via ajax call, it sounds like i'm doing everything alright but one thing which is causing the duplication issue. My load more button does work ...
0
votes
0answers
167 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
0answers
2k 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> <title&...
0
votes
0answers
219 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 add_form;...
0
votes
0answers
278 views

Usage of wp_send_json_success and wp_redirect at the same time

I have to send the success response to ajax if user filled the form fields successfully or not on the client side and redirect to the other page which finalize his authorization at the same time on ...
0
votes
0answers
79 views

Output JSON and no theme

I would like my plugin to create a url which only outputs JSON. The JSON feed contains settings and other info about this plugin. I would like to know how my plugin registers a url which only ...
0
votes
0answers
165 views

JSON Feed on my wordpress Blog

I have just installed 2 plugins for JSON feed for my blog as I need to develop an Android Application for the same. Plugins used : 1.) http://wordpress.org/plugins/feed-json/ 2.) /plugins/json-rest-...
0
votes
0answers
313 views

how build custom json api controller for all registered users

i use the json api! from wordpress. And try to build an own json api controller, i want return all registered users with the following controller but thats not give an array with all users, ...
0
votes
0answers
751 views

Fetching instagram api not working on wordpress

<?php $json = file_get_contents('https://api.instagram.com/v1/users/userid/media/recent/?access_token=accesstoken'); $a_json = json_decode($json, true); foreach( $a_json['data'] as $key => $...
0
votes
0answers
40 views

Developing a plugin, ran it through P3 Profiler, shows up slow, but I don't know why

I am having an issue with my plugin I'm developing. After using the GoDaddy P3 Plugin profiler, it shows that is taking up a large amount of runtime, but the plugin itself is very minimal. It just ...
0
votes
0answers
100 views

Is there a way to share a template/markup with the JSON API so that it doesn't need to be declared both in PHP and in JS?

Current Setup I'm using WP's JSON API on a custom post type archive to query some posts. I then parse the returned JSON object to output my markup accordingly. I also have a single post type template ...
0
votes
0answers
566 views

how to display json_encode via $wpdb

ive been struggling for quite a while how to make this work. i created a custom php, and used it as a template page. [below code] i also ended up with this link //localhost/site/?page_id=43 if i ...
0
votes
0answers
81 views

Is it possible to make Wordpress as a RESTful app?

I'm planning to create a Wordpress plugin that accepts data via cURL and sends a JSON reply. The plugin will save the data in the database upon receive so there has to be some authentication and will ...
0
votes
0answers
591 views

How does the JSON API work to parse incoming JSON and fetch a post based on an ID?

So I have to interact with a large, seperate system on another server that is going to return, at the very least, post ids to my wordpress install in json format. And before others might ask why I'm ...
0
votes
0answers
533 views

Different way to export data from WP?

does anyone one if there is any other way how to export all data from WP than than the default export plugin? I need it because I have JSON arrays in my custom fields and when I import XML file ...
0
votes
0answers
599 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 ...
-3
votes
0answers
26 views

Auto Generate Chart in Posts

I'm using WP REST API to publish content for my website. Is it possible to generate charts and insert into posts by coding? I tried Visualizer Library but did not know how to do it automatically by ...