Questions tagged [json]

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is incorporated in WordPress through the REST-API.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

How to fix WordPress Ajax call loading endless? [closed]

I am currently developing a WordPress site called https://fishnmeats.com/ and I am having issue with it's Ajax call ... Because if we click on any action they loads Ajax for live time update is not ...
0
votes
1answer
16 views

ajax response strips multidimensional array and unable to decode

I am using the wp_ajax_ and wp_ajax_nopriv_ in localize script I am passing a big multidimensional array( it's big!). It works without any JSON encode, decodes. But I want to encode it is while I make ...
-1
votes
0answers
30 views

WordPress.com REST endpoint for /wp-json/wp/v2

The REST endpoint /wp-json/wp/v2 is available for self-hosted WP blogs. Where do I find this endpoint for blogs that run on WordPress.com? I tried https://public-api.wordpress.com/wp/v2/sites/example....
0
votes
0answers
10 views

Include dynamic generated pages in Wordpress search

I am creating 7-8 pages dynamically based on a JSON response from recruitee and want to include those pages in my search so that if someone is searching for "webdev" matching results are getting shown....
0
votes
1answer
16 views

Wordpress output data to another website and pull data

Would you like to ask, is it possible to send data from the WordPress website to another website, and get the data back from another website? I would like to make a function with text insert and a ...
-1
votes
1answer
23 views

How do i save this python code to text file.? [closed]

# Dependencies import json import requests # Specify the URL url = "https://official-joke-api.appspot.com/jokes/programming/ten" # Make request and store response r = requests.get(url) print("...
1
vote
0answers
24 views

Custom endpoint to get all custom taxonomy terms

I'm trying to build a custom endpoint to get all terms from custom taxonomy the taxonomy name is cats I'm using this code function wl_cats() { $args = [ 'numberposts' => ...
0
votes
1answer
14 views

Consult array data in REST API Filter

Is it possible to make a filter with REST API Filter or any other technology to discover all elements that have job_listing_category = 86? Since job_listing_category is an array. Actual state: https:/...
-1
votes
0answers
10 views

Wordpress login auth for anadroid

<?php /* *required plugins are the download links :- * JSON API : https://github.com/PI-Media/json-api * JSON API Auth : https://wordpress.org/plugins/json-api-auth/ * JSON API User ...
0
votes
0answers
44 views

Intergrate JSON into wordpress

is there an easy way to intergrate a JSON script in to Wordpress? I have a JSON API from a thirt party sorftware company which i have to use so customers can create an account on our site. Thanks in ...
0
votes
0answers
11 views

Single Post Pagination via REST API when post is split into multiple pages

Within a post you can use the <!--nextpage--> tag to split a single post into multiple pages. With the Rest API, you can get an entire single post by doing: http://example.com/wp-json/wp/v2/...
0
votes
0answers
27 views

Send a JSON Data from a Form in WP to external API

I made a form in WP but I need to send all the data from the form to an external API in JSON Data, but I don't know how to do that, I just need suggestion on how to do that.
1
vote
0answers
18 views

WordPress JSON data to and from database to be shown on rest point

I am building a plugin that retrieves YouTube videos for a given channel and stores them in the database. Once they are safe in the database I create a REST point which I can access than any time to ...
0
votes
1answer
23 views

How to display “META” array in register_taxonomy

How do I get the "META" field to go off "META: []" for something filled in? I am using this code: register_taxonomy( 'job_listing_category', 'job_listing', [ 'labels' => [ ...
0
votes
0answers
24 views

Loop through Wordpress API response errors

I am having trouble parsing my AJAX response from my WordPress API that my hybrid mobile app is making. Below is (one of many ways I have tried to parse the response all of which have not worked): ...
2
votes
1answer
24 views

Options to get my custom post type metadata via the WordPress API

I am using a plugin that adds multiple custom post types all of which have their own meta-data. I am able to expose the custom post type to WordPress's API but the metadata collected with those post ...
0
votes
1answer
66 views

Issue with json decode in Wordpress - value is not returning consistently

I have a json file I am displaying the contents of on my wordpress site. The issue stems from the fact that some of the values I'm returning I need to sort through later, and while that value is ...
0
votes
1answer
53 views

ACF save json to custom directory not working, default acf-json used instead

I am using Advance Custom Fields local json so I can synchronise my forms across different environments. See my function below, with var dump outputs in comments so you can see what is going on... ...
0
votes
0answers
14 views

using javascript templating with wordpress to save time on post updates without impacting seo or ux

I have one JSON file that contains the text content for my hundreds of Wordpress posts. I am using templating, mustache.js, to insert the text content and render the posts. This saves me a lot of time,...
0
votes
0answers
53 views

CRUD from WordPress to Business Central 365 through OData REST API

The goal here is to use WordPress as a front-end to create, read, update and delete data which is being pulled from Microsoft Dynamics 365 Business Central through OData Webservices in a JSON format. ...
0
votes
0answers
21 views

Run hook in functions.php from page link

I'm writing a small function that takes a json file (~1000 objects) and uploads every json object to WordPress posts. I only need to have it run once to migrate data from another system. I wrote the ...
0
votes
1answer
27 views

How to save one API response to WooCommerce order meta data

Have one custom checkout field email type that validates if the email exists or not in a remote server. I sent JSON data to the remote server with this field. If email exists JSON response typically:...
0
votes
0answers
28 views

wp_remote_get, how to update dynamically

please i want the ETHBTC price to be updating dynamically without refreshing the page,, if i use (meta http-equiv="refresh" content="5") it refresh the site. i want only the ETHBTC price to be ...
0
votes
0answers
189 views

Custom REST API with Stripe webhooks error: No signatures found matching the expected signature for payload

I've created an API endpoint listener for the Stripe "payment successful" webhook on our installation. add_action( 'rest_api_init', function () { register_rest_route( 'myplugin/v1', '/stripe', ...
0
votes
0answers
16 views

WordPress JSON Volley Only Get One Last Value

I wanna get list posts based on specific category from this url https://www.kisahmuslim.com/wp-json/wp/v2/categories using JSON Volley, but unfortunately it only get the last value. I don't know ...
0
votes
0answers
6 views

(JSON) Query posts B,C,D,E,F by tags in Post A

I'm using WP query generator to create a JSON code for a WP plug-in which call post titles. But, for now, i have to type manually tag1,tag2,tag3 related to the displayed post to call other posts. {"...
-2
votes
1answer
24 views

how to know that a wordpress plugin support using API?

i want to ask about wordpress plugins how i can know that the plugin support api and can be used to build apps with Rest-api and some platform like React Native to build apps. the plugin need users ...
0
votes
1answer
119 views

Working with a json feed & trying to figure out how best to import

Good morning all, I need to be able to import a json product feed on a daily basis to update our products and stock. I am starting to write a plugin to make this work, but have a couple of questions ...
0
votes
1answer
25 views

JSON-LD: creating an AggregateOffer from many shortcode

I've created a shortcode which outputs product schema in JSON-LD format. 1 schortcode = 1 product = 1 product schema output 2 schortcode = 2 product = 2 product schema output The problem is that ...
0
votes
2answers
59 views

Plugin Admin Page Ajax-Admin call returning 0, URL set correctly. Implemented localized scripts but did not fix it

I am attempting to submit an Ajax call transfer the source URL of a selected image from a WordPress Media Library to PHP in my plugin settings page. Upon clicking save I'm constantly met with "error, ...
0
votes
1answer
363 views

How does one make a URL return dynamic JSON with custom Content Type?

Some background first, I'm trying to follow the directions here: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/...
-1
votes
1answer
404 views

Undefined property: stdClass::$ AND Trying to get property 'name' of non-object Error in plugin

I created a function that reads an external API and it creates a custom post "Job" with some custom fields. For development, I created it in a shortcode and can reload the page to trigger it. Works ...
0
votes
2answers
108 views

Cannot parse results from wp_remote_get

I'm calling an api with wp_remote_get and I can't seem to parse the results. Here is how I call the api: $url = 'https://blah/api/data/'; $args = array( 'headers' => array( ...
0
votes
0answers
15 views

delete posts that are not in JSON feed

I have to synchronize an external JSON feed with wp post. this have to be a hourly chron job. I have managed out how to import, and update posts from yhe external json feed using wp_insert_post(), but ...
0
votes
0answers
229 views

Delete product image using WooCommerce API?

I'm trying to remove product image (one at a time) using WooCommerce API but I'm facing a strange problem. I can remove all associated image at once by sending an empty array in images: { images:[] } ...
0
votes
0answers
87 views

pulling in external JSON search results into WordPress

I want to retrieve search results from a search appliance that gives results in JSON format. Interacting with the form below takes the user to a page of JSON data. Instead, I want to take the search....
3
votes
0answers
173 views

Wordpress REST API “rest_authentication_errors” doesn't work external queries?

Wordpress REST API "rest_authentication_errors" doesn't work external queries? I was using following experimental codes for experimental purposes. add_filter('rest_authentication_errors', 'auth'); ...
2
votes
2answers
584 views

WordPress Rest API: How do we validate with our custom API key?

How we can verify "Cancel the header auth" the "endpoint" functions of WordPress with an API key that we produce. (Note: not a different endpoint, original endpoints) I have my own "Crypto" class/...
0
votes
1answer
28 views

How can i send id of the currently posted form data through json response in custom wordpress plugin?

I've used wp_send_json() to send the currently posted form data but cannot find a way to send the id attached to it which is incremented automatically from the database,, so that i can update the ...
0
votes
1answer
73 views

Populating Custom Fields from live JSON

I'm trying to populate WP custom fields using the code below, my problem is I can't output the nested JSON field data.quote.USD. Can someone help find the right direction here? Thank you. //some code ...
0
votes
0answers
39 views

404 not found if user, email already exists [Plugin: JSON API User]

-I am using the JSON API User Plugin for WordPress Rest API data. -When i used this API to register a new user, if the user already exists, it retrieves a 404 not found. Thanks in advance Response :...
0
votes
1answer
93 views

How to order WordPress Rest API data

I am pulling in some data via the Rest API: https://legalsecurityforum.com/wp-json/wp/v2/speaker?include[]=3116&include[]=3249&include[]=3170&include[]=3416&include[]=3181&include[...
0
votes
0answers
38 views

Images names not inserting in Wordpress Database from Dynamic Add / Remove fields

I have created dynamic add / remove fields in which one is file upload fields. Everything is working fine. But there is one problem. When I add images in file fields and fill other details in other ...
0
votes
1answer
10 views

I Want a More Concice Form of Data than an Array

This is pretty abstract and isn't truly WordPress related, except that I'm storing this data in a WordPress installation, so I am limited to PHP/MySQL-esque parameters. Here's what I want to do. I'...
0
votes
0answers
128 views

JSON Schema Output Object rather than Array

I've set up a custom post and added various custom fields using Advanced Custom Fields. The data can be viewed here: khclassics-co-uk.stackstaging.com/wp-json/wp/v2/classic_car However, when I ...
0
votes
0answers
34 views

Extended Custom Post type get all posts in wp-json

Using johnbillion/extended-cpts I try to figure out how can I have all posts in wp-json response. Till now what I tried did not worked I registered the post as it follows ...
1
vote
1answer
326 views

AJAX in plugin wp_send_json() sending html

I wrote a plugin that calls a PHP function from JQuery and the php sends a json response back to the Jquery using wp_send_json(). The functions are all called successfully, but the json request sends ...
0
votes
1answer
118 views

Add custom schema to post

I'm building a car listing site which needs custom schema added to each vehicle. The schema doesn't comply with the standards sets, this is the example I've been sent: https://www.carandclassic.co....
0
votes
0answers
61 views

GETing data from a gzip compressed API?

I know WP can get JSON API data via a GET request, but does anyone know plugins/ways that I can get and decompress JSON data from a gzip compressed API? I would then output the JSON response to a ...
0
votes
0answers
56 views

Zip a file and add as attachment

I first add support for mime type attachments // ADD MIME TYPEs FOR ATTACHMENTS add_filter( 'upload_mimes', 'my_myme_types', 1, 1 ); function my_myme_types( $mime_types ) { $mime_types['txt'] = '...