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
182 views

How to add a Custom Mailchimp AJAX Newsletter Subscribe Form

I want to add a custom Mailchimp AJAX Newsletter Subscribe Form to my WP Blog. I found this tutorial and have followed it: http://neal.codes/blog/custom-mailchimp-ajax-newsletter-subscribe. I've got ...
0
votes
1answer
40 views

Is it OK to use a system cron to trigger a function hooked into the AJAX API

I have a real cron job setup and it seems to work. I have outlined the basics below. The reason I ask is I don't see this method mentioned often and I'm wondering if that is because doing so is a bad ...
0
votes
1answer
643 views

Ajax load more posts - WP_Query parameters not working

I'm trying to replace the standard WP pagination with an Ajax load more posts button. I'm basically following the code from this question which for the most part works well. Here's the relevant ...
0
votes
0answers
20 views

ajax and php code

I try to send ajax data to my Wordpress site. The ajax code seems to work fine and it POSTS to a php file its data(this php file is located in my plugin folder). I send the ajax data when I navigate ...
0
votes
1answer
85 views

Server hammered by queries to admin-ajax.php

I'm getting tons of requests (a dozen per second) from a bunch of different IPs for POST /wp-admin/admin-ajax.php. Strangely enough none of these IPs ever request any other page (as far as I can tell ...
0
votes
0answers
77 views

Create a popup/modal to select category before enter site

I need to create a Popup or Modal that works like this: When user access the website, a modal appears at screen and makes user choose two categories: STATE and CITY. States are parents of Cities. ...
0
votes
0answers
321 views

Woocommerce “Add to Cart” ajax

On the product category page, when someone clicks "Add to cart", woocomerce adds automatically "View cart" below this button through Ajax. I found that the script in /assets/js/frontend/add-to-cart.js ...
0
votes
0answers
41 views

Generating a URL with no content for captcha

I modified my regular form to ajax form. I have captcha simple_php_captcha in my form which is generating captcha. I need to chage it's image if the user request it to change. I am thinking to ...
0
votes
1answer
370 views

ajaxurl not defined on front end

I am trying to create a ajaxform on the front side. I am using the code jQuery.ajax( { type: "post", dataType: "json", url: ajaxurl, data: ...
0
votes
1answer
26 views

Simulate a specific page when making AJAX calls

I'm interested in loading parts of the interface of our theme over AJAX and wrote a function to handle generic functions. (Code below.) It works fine, but wp_nav_menu(), when run through this ...
0
votes
1answer
46 views

Can't add classes using jQuery from a JSON string with get_body_class()

In order to refresh the classes on the <body>element after an AJAX call, I am writing at the top of my AJAX response the following in JSON: $o[ 'classes' ] = get_body_class('project'); I can ...
1
vote
0answers
88 views

Admin wp_ajax hook returning 0

I've done some research but I can't seem to find the correct answer so I'm hoping someone can give me a hand. I'm attempting to use the wp_ajax hook in the admin section. The functionality should be ...
1
vote
0answers
88 views

AJAXIFY WordPress Theme Frontend menu

I have the next code in my functions.php add_action('wp_enqueue_scripts', 'my_frontendscript'); function my_frontendscript() { //registering script wp_register_script('frontendscript', ...
0
votes
1answer
72 views

Ajax specific template not loading in replacement of index.php

Following my previous post (Full-Ajax Theme: parseJSON error while building a JSON object from a Wordpress custom template) regarding a few problems concerning JSON (now resolved), I am trying to load ...
0
votes
0answers
29 views

Widgets: Ajax Filtering and Add rewrite rules

I have built an Ajax filtering plugin for my widgets that works by adding url params through jQuery (when a link is clicked) and having pre_get_posts $_GET these values. These values then setup the ...
0
votes
1answer
79 views

Full-Ajax Theme: parseJSON error while building a JSON object from a Wordpress custom template

Trying to make a full-ajax navigation on my new portfolio, I read online on a few different blog that building the templates using JSON would be easier in order to treat the datas however I want. It ...
0
votes
1answer
39 views

Wordpress ajax not working in registration

guys. I've tried to build a wordpress simple registration form with ajax, but it doesn't work at all. Here is my code, a php and jQuery ajax. Please tell me what's wrong with my code. FYI, (1) the ...
0
votes
1answer
142 views

Using AJAX to return search form results

I'm trying to take user input from a search form, build a query based on user input, and then return relevant posts using AJAX. Right now, the form builds the select dropdowns properly. The form ...
1
vote
1answer
242 views

Can't trigger an AJAX function with a submit button in the dashboard

I'm writing a WordPress plugin. My plugin has forms that post data to other pages generated by my plugin within the WordPress dashboard. I am trying to create an AJAX function that is triggered when ...
0
votes
0answers
190 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 ...
9
votes
2answers
218 views

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
120 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
49 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
16 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
52 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
90 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
57 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
34 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
92 views

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
26 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
148 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
149 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
63 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
352 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
424 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 ...
0
votes
0answers
27 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
1answer
91 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
50 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
104 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
105 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
31 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
84 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
312 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
2k 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
192 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
94 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
46 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
89 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
39 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
134 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 ...