Ajax - The core of WordPress uses Ajax only in the administration screens. For instance, Ajax is used for instant updates when you are doing comment moderation, and when you are adding and deleting items from lists such as categories, blogroll, and posts; Ajax is also the technology behind the auto-...

learn more… | top users | synonyms

0
votes
0answers
41 views

Ajax Wordpress: Load post title and custom fields

I'm customizing the Ajax output of Essential Grid Plugin that by default only shows the post_content. I need to show the_title and several custom fields. How can I achieve this by modifying the below ...
0
votes
0answers
11 views

Make youtube and vimeo videos work with ajax? [duplicate]

I have some videos , the url pasted in the content. the video displays fine but not when loaded via ajax, i just see the url. how can I fix this problem so youtube and vimeo videos render like ...
0
votes
2answers
98 views

How to get those data using with ajax json?

The following coding is the out come of an other page php echo user_list.php: $myarray=array(); ... ... $myjson = json_encode($myarray); echo $myuser->searchUser($myjson); and the result of ...
0
votes
0answers
273 views

AJAX image upload with a upload progress bar using media_handle_upload

I currently have post image upload for the featured image from front-end form. <input type="file" name="wh_image_upload" id="wh_image_upload" multiple="false" /> and using media_handle_upload ...
0
votes
1answer
101 views

WP Cron as Fast as WordPress AJAX?

I have a question about performing a very long and resource intensive task within WordPress. Here is the scenario. I have a plugin that allows users to run a task that takes a very long time and ...
0
votes
0answers
19 views

How to limit each front-end user to view just his own uploaded files on Amazon S3?

In my Wordpress website Users can upload video files directly to a Amazon S3 bucket, all of them use the SAME bucket for their uploads. After the upload is done each user should be able to view/delete ...
0
votes
1answer
27 views

Not getting result using ajax on wordpress

I have used the following code on my functions.php page add_action('woocommerce_product_thumbnails', 'my_ajax_button'); function my_ajax_button() { echo '<button class="buy-this-room myajax" id="...
0
votes
1answer
267 views

Ajax image upload with media_handle_upload and form.js

I want to have AJAX image upload on front-end form and can't figure out where it goes wrong. HTML form for image upload <form id="thumbnail_upload" method="post" action="#" enctype="multipart/...
0
votes
1answer
523 views

Processing ajax call to php to insert into mysql database

I made top menu in wp admin dashboard. There I will have input field. It will be input where admin can enter Google locations. After picking correct location admin will press save and location will be ...
-2
votes
1answer
30 views

How to make a rest style plugin?

I created a plugin that is basically a crud to write to the mysql database. I want to know how to display the data on a wordpress page. I'm reading about url rewrites but it seems rewrites are for ...
0
votes
0answers
87 views

Trying to update User Meta with Ajax

I am trying to make a plugin to record the users browser based location as user meta data stored as Latitude and Longitude. This current version is trying to make user meta via form, but ultimately I ...
0
votes
2answers
45 views

Ajax call URL 404'ing when pushed to staging server

I have AJAX form submission working fine locally. But when pushed to my staging server the process page is 404'ing. I cannot access it directly neither as it 404's but checking on the server and its ...
0
votes
1answer
116 views

AJAX and do_shortcode

I know questions on this subject have been asked before. But I'm stuck and cannot find a way out. I am using Ajax to load external information to my site. Initially all the information was loaded at ...
0
votes
0answers
28 views

What is the best way to handle Ajax image upload on front end?

I have been searching around for awhile but haven't found a solution yet. For this question, I like to get some general answers or resources for implementing AJAX image upload in front-end form. ...
0
votes
1answer
86 views

Autocomplete for titles via ajax - rework of past post away from like_escape()

I'm trying to create an input field that can autocomplete only title from a CPT. They don't have to be linked, they just need to pull titles of a cpt alphabetically and searching from the first ...
0
votes
1answer
172 views

wp_ajax action is not run when ajax trigger

I'm trying to implement the ajax in wordpress world but now stuck. Function hook suppose to be called when ajax triggered is not happening. I check the network admin-ajax.php is called but ...
0
votes
0answers
66 views

AJAX and Genesis Framework

On the website I am building, I have made 4 WordPress pages. I have a jQuery script which adds classes on certain divs when a user clicks on the links in the navbar. Obviously this is not working ...
0
votes
0answers
67 views

Load More CPT’s with Ajax?

I am using the following tutorial to load the next range of posts. I am however, trying to adapt to use it with Custom Post Types and not having much luck. This is the default code.. function ...
0
votes
0answers
46 views

add_order_item from custom endpoint

Im useing WP>Woocommerce->Woocommerce subscriptions I have created a custom endpoint: /edit-subscription/. You can see exactly what i did in the last comment here: https://github.com/woothemes/...
0
votes
1answer
57 views

AJAX Post from same domain to a wordpress page

I am trying to create an ajax post listener to a wordpress page in a domain (let's just say http://example.com). Another web app in the same domain (http://example.com) exists and a user sends ajax ...
0
votes
0answers
36 views

ajax and nonce when js is in a seperate file

I'm a little confused how nonces work with ajax requests. It looks like I use this: https://codex.wordpress.org/Function_Reference/check_ajax_referer So it looks like your request is: <?php //Set ...
0
votes
0answers
59 views

Display the post on page scroll and auto update URL

I have to create a page template on which I can show all the posts by category when scrolling down the page; here is an example. My theme index page code is: do_action( 'st_theme_init' ); get_header(...
0
votes
1answer
62 views

PHP Warning: Missing argument 2

From ajax Im updating a custom user field and visualising proper content using a shortcode. localising jquery function localise_jquery1410() { wp_enqueue_script('jquery'); wp_enqueue_script( '...
0
votes
0answers
37 views

Run query with meta key via AJAX

I'm completely new to AJAX, and I can't seem to find anything that's pointing me in the right direction. I have a table that contains one row for each post in a post type. Each row contains the posts ...
0
votes
2answers
261 views

Wordpress Ajax JSON success return no being recognized

I'm working on a contact form for a website using an jQuery Ajax call method that then uses Wordpress's building in admin-ajax.php to submit the form's values, send them to an email address via ...
0
votes
1answer
1k views

WP-API and Basic Auth returning 403 on POST but not GET

I am using the latest, WP-API and the recommended Basic Auth, to test adding a post to WP from remote. I have Access Headers opened up on the WP side: header("Access-Control-Allow-Origin: *"); ...
0
votes
1answer
61 views

How to fetch meta_value and meta_key in matrix after ajax request by post_id

Well, I have 2 custom post types: A = Properties B = Property Owners Inside CPT Properties, I was created a Meta Box to: Search a registred Owner (CPT) by VAT number (CPF in Brazil) Relate Owner ...
-1
votes
1answer
297 views

Facebook Pixel + WooCommerce + AJAX = Confusion

I am trying to add a Facebook Pixel (tracking) to the WooCommerce Add to Cart button, using: <script> fbq('track', 'AddToCart'); </script> The problem is that when a user clicks on Add ...
0
votes
0answers
295 views

Load custom post type posts using AJAX on static front page[custom query loop]

I am using following custom query loop to load 'portfolio-item' type posts on static front page. The loop is working great with custom numbered pagination but I want to convert it to AJAX call and ...
0
votes
1answer
122 views

Update Data parameter of a wp_localize_script() call

I'm working on a child theme, In my-page-template.php I have : //... $current_key= 5; //calculated result wp_localize_script('my_js', 'ajaxload', array('post_id' => $current_key)); In my_js.js ...
0
votes
0answers
35 views

wp_delete_comment is doing nothing

I'm using front page delete links for users to delete their own posts and comments. The links are generated on the page like this : <a href="#" data-id="<?php the_ID() ?>" data-nonce="<?...
0
votes
0answers
32 views

Ajax form nonce fails

I have a email form in Wordpress and I'm using ajax to with it. I'm creating a nonce in the form and checking it before I send the email. The nonce fails but the output shows it is the same nonce. ...
0
votes
1answer
329 views

How to use get_posts() function in functions.php

I am trying to load posts with ajax. But I am not getting any content of the posts. I am not posting my javascript since it is pretty straight. Here is my code in inc/helper-functions.php which is ...
0
votes
0answers
41 views

Form submissions not posting to database / displaying in dashboard

In the process of building a simple contact form plugin. For some reason - the data from the form submission is not being posted to the database /and or displaying in the WordPress dashboard. If ...
1
vote
2answers
31 views

AJAX not Working with php as supposed

I am creating a like system in PHP . My code looks like this . <?php class Like_System { private $userid; private $postid; private $user_ko_like_count; private $post_ko_like_count;...
0
votes
0answers
175 views

Ajax jQuery doesn't work in mobile

I created an Ajax file to send data to my functions.php and then return values to the Ajax file. PC works perfectly, but in mobile, on an iPhone in this case, why is it not working? This is my ...
0
votes
1answer
265 views

Cache plugins and ajax nonce verification

I created a plugin which use some ajax requests to load more posts on click. I noticed that when I use a cache plugin like W3 Total cache plugin then the wp_verify_nonce($nonce, $action) fail ...
0
votes
1answer
39 views

Can Ajax Action [add_action('wp_ajax_{action_name}', '{action_name}'] be hooked into wp hook

Just curious - whether AJAX Action can be hooked into wp hook? For Example: add_action( 'wp', array( 'MyAjaxRegistrarClass', 'ajax_registrar' ) ); // MyAjaxRegistrarClass class MyAjaxRegistrarClass{...
0
votes
0answers
283 views

Need to save data to database from AJAX phone submit form

I have an input that accepts a country code (a select/dropdown form) and a phone number (number input) and submits them via AJAX to a pin verification service. The verification works great, but I need ...
0
votes
1answer
58 views

Is there a way to optimize function that is used for returning data in an ajax-call?

I've started creating some plugins (not offically deployed yet) (feel free to use it you want to), and now my goal is to include a custom post type and taxonomy and being able to use Advanced Custom ...
0
votes
2answers
301 views

Passing variable data from external jQuery file to options.php

I'm setting up a plugin that requires passing of a variable from a stand alone jQuery file to options.php. I have (I think) set up the scripts to be used in my plugin file like so: function ...
0
votes
0answers
71 views

Initial load of category jquery

I've succesfully implemented this jquery I found in another thread, using ajax to load different categories.. Problem is that posts are only loaded after a click - i'd like to display one category on ...
0
votes
0answers
45 views

Transposh reverts to original language after Ajax request

When using Transposh, the translation goes back from French to the initial language each time an Ajax request is made by the theme through BuddyPress. Here is my website, using the theme Sweet Date. ...
0
votes
0answers
110 views

My AJAX requests take 30 seconds to complete

I am a wordpress newbie messing around with a wordpress installation on localhost using XAMPP and I've encountered a weird problem that I can't find any information on. The problem is that every time ...
0
votes
0answers
220 views

How to add a Load More button for get_categories()?

I want to add an Ajax "Load More" button for category post display. I want to show only 6 categories per page. However, the other categories are loading after clicking on the button. Can anyone help ...
0
votes
0answers
28 views

Select from a list, keep the layout besides from one div

Hi Wordpress experts out there! :-) I want to confirm that I am thinking correctly regarding to how to achieve a thingie... I have page with a layout like this (simplified) {header} {column 1} {...
0
votes
0answers
224 views

Ajax request not working on firefox

myscript.js jQuery(document).ready( function ($j) { $j('#button').on('click', function () { var data = { action: 'time', type: "POST", time_var: 'day', ...
0
votes
0answers
38 views

How to link images to a certain property type

I've build a web page, in which an user certain data; the user can add also images, and once everything is done, he/she clicks submit and a Property post type is added. The problem is that the images ...
0
votes
0answers
68 views

Loading WP post with AJAX in Fancybox with home in background on post URL visit

I'm developing a WP site where product thumbnails (post's featured image) are displayed on the homepage and when the user clicks on one of them, the post is loaded inside a Fancybox with AJAX. I want ...
0
votes
0answers
397 views

How to make AJAX call to custom PHP file in Woocommerce?

I've run into some problem of Woocommerce when I tried to make an AJAX call on Checkout page to my custom PHP file uploaded to my theme's folder. After googling a while, I still don't quite understand ...