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 ...

learn more… | top users | synonyms

1
vote
1answer
39 views

How to set post_id to 0 when you upload image via Add media button. (async-upload.php)

How to set post_id to 0 when you upload image via Add media button which will make a requtest to async-upload.php Instead of actual post_id? Thank you.
0
votes
1answer
47 views

Is there a better way to access transients using javascript

I've been searching around the web trying to find a better way to use wordpress transients with javascript. Currently I am using admin-ajax to run a php function that retrieves the transient and ...
0
votes
0answers
6 views

transfer session to speed up ajax?

just an idea but since 4.x got even slower, might it be possible to just transfer an authenticated session to my own app? I hope in connecting both over a secured message bus (mqqt) would eliminate ...
0
votes
3answers
60 views

MySQL query in Wordpress with AJAX

I have a search form which searches the DB and returns back some data. I have managed to use Wordpress wpdb to connect and use select statement on the table and retrieve data. Everything works ...
1
vote
2answers
131 views

add_action and Ajax

I'm developing a plugin and I've started from WPPB and Wordpress 4.3.1. I've named it dogmaweb. I need to submit a form to the plugin via Ajax. The form is created by the plugin itself. In my ...
0
votes
1answer
21 views

delete_user_meta Delete one value out of array

The code I have is not working cause the value saved as array and I'm not sure how to fix this. // Remove favorite authors from current users DB function fav_author_remove_user(){ ...
1
vote
1answer
22 views

How can I inject options into an select tag inside the widget form?

I created a widget, that retrieves filenames from the database and am now trying to output the filenames as options in a select tag inside the admin widget menu(the form function in the widget class). ...
0
votes
1answer
12 views

Why is the form not updating when I select a new sector from the list?

Im trying to fix a form on http://s195004125.websitehome.co.uk/jobs/ for some reason the sector selection box doesnt update the list below when a change ios made but it changes when you select a ...
0
votes
1answer
54 views

$_POST empty in using new php file added to theme

I am using a theme which handles form data with jquery (a handler function defined).I have added a new php file to theme (using it in as template in a wordpress page, also registered with rewrite ...
0
votes
0answers
36 views

AJAX nonce with check_ajax_referer()

I want to use check_ajax_referer() to verify a WP_nonce field using AJAX. Here you can find my html element. <input type="hidden" name="login_nonce" value="<?= wp_create_nonce('login_nonce'); ...
0
votes
1answer
42 views

admin-ajax.php GET custom-post titles

I can't get the titles of my custom post. this is what i'm doing: //IN functions.php function fluid_scripts() { wp_enqueue_script('lateral-fluid', ...
0
votes
0answers
75 views

Pagination for ajax category filter

I created an AJAX category filter for a custom post type with custom taxonomy. 1)It's working but can't figure out how to add pagination for the custom taxonomy once it filters. When I click on ...
0
votes
1answer
23 views

WordPress Feedback popup with date saved into table

Spending now more then 2 days of searching and testing all kind of plugins, I need some help. I need a Feedback popup plugin with these tasks: front-end pop-up with main question + text area for ...
1
vote
0answers
43 views

How do I pass the id of my widget to javascript in the form function?

I would like to add a Quilljs editor to the admin area of my widget, but I am having trouble passing $this->id to javascript. I am using the foo_example widget code, and I've appended the ...
0
votes
0answers
22 views

AJAX - nonce verification fails

I have a simple add-to-newsletter widge. I created a hidden input with nonce: $nlnonce = wp_create_nonce("add-newsletter"); echo '<input type="hidden" id="nlnonce" value="'.$nlnonce.'" />'; ...
1
vote
0answers
49 views

Init plugin again after ajax call finish

We have this website that the navigation between pages work with ajax. in the blog page we use this great plugin to make the ajax load-more posts. all works great but the problem is that when you ...
2
votes
1answer
48 views

Comparing arrays within a loop

I am trying to write a save search function, where the user can save their searches, but I need some help in checking if the search is already in the database for the current user making the search. I ...
2
votes
1answer
75 views

Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]

What I eventually want to do is when user logged-in to the site, I want to redirect the to the page with all the post created by that user and I want to load them via AJAX request. I have save ...
0
votes
1answer
220 views

Woocommerce Ajax Add cart not working

In woocommerce ajax add to cart method not adding when cart is empty, if cart contains something then my ajax function adds but if cart is empty it doesn't add. And no error. Here is the link. PHP ...
0
votes
0answers
283 views

Insert data into mysql database with php and ajax

I made admin menu inside wordpress and I have form that allows admin to insert some values. I have html: <form id="prices_form" method="post" action=""> <div ...
0
votes
0answers
102 views

Ajax - Post Categories and Load More

I have a page_template on my front page where I want to show "all post category" by default with a maximum of 5 post, but there will be buttons for each of my category, so when they click on a ...
0
votes
0answers
24 views

Server side validation on AJAX form submit from front-end

My current server side validation is not working with AJAX submit. // Tracking error messages function write_here_errors(){ static $wp_error; // Will hold global variable safely return ...
0
votes
1answer
64 views

admin-ajax.php returns 0. How do I debug it and fix it?

Trying to use admin-ajax.php to upload image from front-end form. I'm keep getting 0 with below code I have and not sure how to debug this or where it goes wrong. I have HTML input file <input ...
0
votes
0answers
26 views

ajax pull and show how to show custom fields?

hi guys I have this code is part of essential grid, a plugin to show content. im trying to customise the ajax view of the plugin, that opens posts via ajax request. case ...
0
votes
1answer
108 views

Live search from database table

I have wordpress site. I made custom table and sotred values in one row. Now I made admin menu and added input field into it. <input id="location1" type="text" /> I need to predict search ...
0
votes
1answer
24 views

Can't retrieve any content from Ajax-loaded page

Once my_file.php is loaded through Ajax I can't get any WordPress content from it, even though Wordpress functions run without generating any error messages. Note that I'm doing Ajax the old school ...
0
votes
0answers
18 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
38 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
100 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
51 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
15 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
22 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" ...
0
votes
1answer
157 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="#" ...
0
votes
1answer
237 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
29 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
39 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
37 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
59 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
19 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
49 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
83 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
41 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
43 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
31 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: ...
0
votes
1answer
30 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
20 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
32 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' ); ...
0
votes
1answer
47 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
24 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 ...