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

0
votes
0answers
11 views

Woocommerce checkout update totals with datepicker

I've added a new date field on the checkout page. I'd like to create a date based delivery fee calculation. The date field has the 'update_totals_on_change' class. When changing this manually the ...
3
votes
1answer
32 views
+50

Why not register shortcodes if is_admin dashboard?

I have noticed that some plugins such as Contact-form-7, Nextgen-gallery, possibly others, have an interesting anti-feature of not registering their shortcodes when is_admin() is true. The ...
0
votes
0answers
18 views

Front-end Ajax File Upload

I'm working on a project where registred users can upload file to a specific post type. For a more fluid navigation, I'm making this whole part with Ajax, so the page never reloads. However I'm having ...
0
votes
0answers
11 views

map with ajax content load

Hi i made a svg mapa to load data from a locations cpt, so when i click the location it loads the content through ajax. It all works fine, but that is in the cpt page archive page. Now i need a map ...
0
votes
0answers
13 views

Tie the sending of an ajax request to Wordpress hooks

I'm tracking events on my site such as login & registration and need to send an AJAX post when these events occur. I've explored ways to do this from the frontend, but have determined that the ...
0
votes
0answers
18 views

Conditional forms with wordpress ajax

I'm creating a wordpress megamenu plugin, i've setup the walker and all frontend things But stuck in the backend i changed some of the walker class <?php /** * /!\ This is a copy of ...
0
votes
0answers
41 views

How to use nonces for frontend AJAX voting if the page gets cached?

I'm building a custom voting solution for my site that would allow public AJAX voting on multiple posts per page. Votes can be added/changed/revoked. Values are stored in custom post meta. I ...
1
vote
1answer
22 views

How to remove an Ajax action

There is a plugin that is loading ajax actions like so: add_action( 'wp_ajax_nopriv_func_name', array( &$this, 'func_name' ) ); add_action( 'wp_ajax_get_func_name', array( &$this, 'func_name' ...
0
votes
0answers
16 views

Applying ajax on a certain part of the page without plugin [on hold]

So, let say you have 6 sections in a page. One of the sections has pagination and I want to apply ajax pagination so that the entire page is not refreshed. I am not familiar with how ajax can be ...
0
votes
0answers
12 views

Run insert if no entry otherwise run update with ajax

Below function works with ajax ... but I am getting a null result ... I want that if there is no data in the database then insert operation is performed and when there is data the update should work. ...
0
votes
1answer
73 views
+50

AJAX call broken after actualization

I have a simple form, where user can set some numeric value and add a comment. Then it is being send to database via AJAX call. So I have two inputs: a numeric slider (text field) and a textarea for ...
0
votes
1answer
25 views

Know which script/page is being called by ajax call

I have to reverse-engineer a wordpress site, which requires some updates, but I am unable to make it work properly at one place. Here, on click of a link, an AJAX call is being made to some page that ...
0
votes
1answer
30 views

Null/undefined return in WordPress AJAX request

I really need help on this one. I've been looking at it for hours and been getting nowehere. I am working with ajax in WordPress and this is kind of my first time doing so. I have a function in my ...
2
votes
1answer
51 views

Timeout on Admin-Ajax?

I am writing a plugin and using admin-ajax. It's a long-running function - that is, it's connecting to an API and loading in posts. This could take 5-10 minutes sometimes. Seems like after 1-2 minutes ...
0
votes
0answers
23 views

Not including wp-load.php in plugin

Okay, so I'm trying to get a plugin approved, and I've fixed most issues except the fact that I'm using require_once to load wp-load.php. I create a button in the admin bar, and there is a javascript ...
0
votes
0answers
42 views

Ajax Button to load more Posts into a timeline

I am setting up a timeline page for a customer and so far i have designed the timeline and i am using 2 loops to place the posts in 2 columns (left and right) where the first post is located at the ...
0
votes
1answer
47 views

Custom Wordpress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB

I'm building a little form to let users update their contact information outside of the vanilla Wordpress user management systems. I plan to use a simple CRUD setup and throw in some sanitation. I've ...
-1
votes
0answers
10 views

NextGen gallery plugin carousel [closed]

How can i make my NG gallery look like on this website http://www.marufotod.ee/.This website uses NGgallery plugin as well. Custom setting do not allow me to customize my gallery like this. How can i ...
0
votes
0answers
19 views

Extract and amend variables from 'like' plugin and put into visual meter gauge plugin

I am trying to extract the total number of likes associated with different posts from the WTI Like Post Pro wordpress plugin, then subtract the number of unlikes and feed this total into a meter gauge ...
0
votes
0answers
38 views

Ajax Issue adding product options to cart [closed]

My store is not allowing me to add product options to cart, I believe this is an Ajax issue with a plugin but I don't know whats going wrong here with it. The source code for the plugin is as follows. ...
0
votes
1answer
27 views

Pass the updated value of aid from form using ajax

I am working in wordpress and I want to fetch the updated value of aid field from form each time a submit button is pressed. There are two submit buttons and I want the id as per the clicked row HTML ...
0
votes
1answer
19 views

Placement of add_action() for ajax callback?

This is probably a palm slap question, but I'm confused. I created what I thought was a simple WP template page. A form to update a form to a db via ajax callback. At the bottom I placed the ...
0
votes
0answers
24 views

Update a div with ajax result

I am working in wordpress and this is an ajax call and I want the result of a row returned to a div with id #hero. Now since the result is a for loop and hero div is in each row. And the form has ...
0
votes
0answers
30 views

Set cookies based on visitor choose (first time visit site)

i am working on solution to set cookies based on visitor choose. when the visitor first time visit my site, popup uppers with "select branch". so when the visitor select the branch i make the ...
0
votes
0answers
14 views

How to add AJAX to PHP table who's data is called through API

I made a plugin which shows a list of all the plugins available in the wordpress repository through API. (More info about that is here: ...
0
votes
0answers
16 views

Ajax request with get_posts

I am new to wordpress development. I basically am pulling information from a custom post based on a category. What I want is to load more post when a button is clicked. I've searched for hours but ...
0
votes
0answers
102 views

ajax form with multiple submit buttons and values

I am working in wordpress and I have an html form with two submit buttons with same classname and different value. I am passing the submit button clicked value through ajax and show it on the screen. ...
0
votes
1answer
94 views

Simple Button onClick to trigger jQuery function

I have looked similiar questions but any of it didn't worked I want to trigger jQuery function with onClick button, but it didnt worked. HTML structure : <button class="my-button" ...
0
votes
0answers
54 views

Ajax call through admin-ajax.php returns 404 error

I am trying to do a pretty basic AJAX request at the moment, just to test functionality, routing my calls through admin-ajax.php. However, every time I try to fire the AJAX request, I get a 404 error ...
0
votes
0answers
35 views

Missing data in admin ajax calls on fresh install 4.2.1

I have a fresh install of wordpress (no plugins installed), and i noticed that $_REQUEST in admin-ajax.php doesn't have data fields. For example, $_REQUEST for adding new menu looks like this: Dump ...
0
votes
1answer
28 views

Ajax live search, “No products found” when the title contains apostrophes and quotations

my website theme has an Ajax search bar. My search bar does not seem to work properly when searching for products containing apostrophes and quotes in the title. Example: Title of a product is ...
2
votes
0answers
36 views

Making a follow button, Ajax not talking to php

I'm trying to make a user follow button using AJAX, but for some reason my AJAX isn't talking to my jk_user_follow function and setting the wp_set_object_terms. PHP function ...
0
votes
2answers
21 views

Get Page Type (Category/Tag) Using AJAX

I want to know if the opened page is a category/tag page. From the JavaScript file, I can pass only the permalink of the page. Is there a way I can find the page type?
0
votes
0answers
46 views

Wordpress JSON API - Prev Post / Next Post using Ajax

I am using Wordpress JSON API to pull data from posts and display it via ajax on a click event. I would like to an include a .next & .previous link which will rerun the ajax request replacing the ...
0
votes
1answer
55 views

click event to unhide something after ajax not firing

I am working in wordpress and my ajax function result showed one button whose html is mentioned below. Now I want to run a click event on that button but when I click it nothing happens. Below is the ...
0
votes
1answer
24 views

Registration form not registering First and Last name

I'm creating a custom registration form which works using username and email inputs, but when I include First and Last name fields it won't let me register. Here is the form: <form ...
0
votes
1answer
30 views

403 (Forbidden) delete file image in themer folder

I'm having trouble with permission to delete files that are within the theme folder. All folders and files are with permission 775 and there is no error in the code , because when I use the code in a ...
0
votes
0answers
70 views

AJAX: admin-ajax.php is adding extra content to my script's response - how to exclude header, footer, etc.?

I am requesting something using WP AJAX through admin-ajax.php . But I've noticed, that response from my ajax hook is modified by admin-ajax.php - it buffers the hook function output and posts back ...
0
votes
0answers
32 views

Ajax is running my insert query twice

I am working in WordPress and I run a function to insert a row in database with ajax. Ajax runs but for some reason insert operation is performed twice. Below is my code Ajax jQuery(function ($) { ...
2
votes
1answer
76 views

AJAX only works when I'm logged as Admin

I want to make an AJAX request on every select value change to update the real value from database. I'm coding inside a shortcode on functions.php. I have a select element like this one below, echo ...
0
votes
0answers
25 views

Use result of first ajax call to trigger another

I am working in wordpress. I have below form 1 which is a search form and when I press search I get results with ajax. Now the result rows have button or link which when clicked should trigger another ...
0
votes
2answers
53 views

Custom Form with Ajax

I am having problems with my form. When the submit button is clicked a 404 error is spit out. If anyone has any suggestions I'd be grateful. Ajax handling of form. Going into theme's js. <script ...
0
votes
2answers
63 views

Ajax not returning anything on form submit

I am working in wordpress and on pressing the submit button I want the function to return result through ajax and result should be shown as an alert on the screen. But when I press submit nothing ...
0
votes
0answers
25 views

Correct way to write jQuery functions in Wordpress

I'm working with an AJAX based Wordpress template (custom), but I'm having some issues getting jQuery to play nicely. I've enqueued everything (in the right order) and to an extent it does work, but ...
0
votes
1answer
28 views

How to request admin-ajax.php correctly when wordpress URL and site URL are different?

When site_url() and home_url() are different, how a request should be directed to admin-ajax.php (both in front-end and admin)? Using A. admin_url('wp-admin/admin-ajax.php') or B. ...
0
votes
1answer
18 views

Nonce doesn't validate in nopriv call

I have a function which uses Ajax calls: function bs_reserve_gift() { if (!wp_verify_nonce($_POST['_wpnonce'], 'reserve_gift')) { $response['status'] = 'error'; ...
0
votes
1answer
48 views

Ajax button not working

So i'm trying to make a follow button in wp, and for some reason the ajax button isn't working right. Here are the steps of what's supposed to happen user clicks #followbtn Ajax goes to $_POST ...
0
votes
1answer
49 views

Prevent wp_debug from polluting ajax within plugin

I've ran into an issue here where wp_debug notices foul up my ajax response. The codex suggests using ob_clean just before returning or echoing: To parse AJAX, WordPress must be reloaded through ...
0
votes
1answer
62 views

How can I pass a variable to wp_ajax action?

I'm writing a plugin that pulls data from an external API and inserts it into a bbPress topic. Here's some sample code: function bbp_ajax() { $topic_id = bbp_get_topic_id(); $the_issue_key = ...
0
votes
1answer
33 views

Workflow for new importer plugin - your advices?

I'm building a new plugin to import Pinterest Pins from a user into Wordpress. It will NOT work using the Pinterest API (which is too limited for what I want to do) and requires the user login and ...