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

4
votes
2answers
345 views

Creating Ajax backend for Specialised Page Template? Should admin-ajax.php be used?

We're scoping an upcoming project that will require the development of a large php web application within an existing wordpress site - this is for our use only and we've no intention of trying to ...
0
votes
1answer
31 views

jQuery AJAX add json2 dependency?

I am working on a voting system in Wordpress with jQuery and AJAX. To make this voting system work I need jQuery in my theme. So wrote the code down in my functions.php. But for some reason my script ...
1
vote
0answers
131 views

AJAX-login over https on a http page, is it possible?

I would like to a ajax login-form on every page. Most of the site's pages are served over http. The ajax-login request is over https. Everything works as expected if I am already on https and try to ...
0
votes
0answers
86 views

Get wp-load.php PATH with wp_localize_script and JavaScript for plugin

I just learned about wp_localize_script() and it's very cool. I read Otto's post and Gary Cao's post, but I'm learning Ajax so I'm trying to wrap my head around getting the path to wp-load.php this ...
1
vote
2answers
162 views

Update meta values with AJAX

I am working on a voting system in Wordpress. I first made it with GET requests but someone told me you should not use GET for this, So I started working with AJAX to update custom fields/meta values, ...
1
vote
0answers
34 views

Admin ajax add tag callback

Is it possible to add an additional callback to admin ajax? Basically, I'm trying to increment the value in an input field of the add form for a custom term after the form is submitted. After the form ...
2
votes
1answer
68 views

Ajax returning correct data BUT at wrong place

I'm trying how to figure out how to use AJAX correctly with Wordpress: (I've used it on other sites, but not in WP) I have this code in functions.php of a theme: function jquery_stuff() { ...
0
votes
1answer
336 views

Ajaxurl suddenly not defined

I am developing a wordpress plugin where I use an ajax call to submit form data, it was working fine and then all of a sudden I get a console error saying that ajaxurl (the url passed to the ajax ...
0
votes
1answer
116 views

Handling an Ajax form submit

I am developing a wordpress plugin that will create a contact form and then submit the details through an ajax request. jQuery.ajax({ type:"post", dataType:"json", ...
0
votes
1answer
45 views

Can't update WP Editor after Ajax

I want to update the WP Editor textarea after Ajax, but it does not work. I have the following in my Ajax success function: $('input#pn').val(response.name); $('select').val( response.category_name ...
0
votes
0answers
70 views

Post Rating System with wordpress

I'm using a Post Rating System with wordpress and jQuery, i followed this tutorial for that. ` jQuery(document).ready(function(){ jQuery("a.like:not('.voted')").live("click",function(){ ...
3
votes
0answers
28 views

How to reinit tinymce for wp_editor after ajax? [duplicate]

Basically if I call wp_editor via ajax it acts funny, I noticed it does not include 2 scripts it DOES include if i call it normally within a form (NOT thru ajax). I found some anwers like tinemce ...
1
vote
1answer
268 views

Search - Ajax - Alter Query Parameters with Pagination

Too Long ; Didn't Read How do I get pagination to work when I'm creating my query with ajax? I'm working on creating a functional search page that allows the user to filter how many posts per ...
0
votes
1answer
67 views

display user input using ajax in wordpress

I want to display user input with ajax . but still is executed function fail in js file. I dont know where the problem might be. I read http://codex.wordpress.org/AJAX_in_Plugins and I saw ...
0
votes
1answer
51 views

Fetching posts from wordpress function in ajax

I'm trying to fetch posts in ajax. Everything is working but It is showing only one post. Please check my code and tell me if something is wrong function ag_get_posts() { global $post; $args ...
0
votes
0answers
81 views

Can I make an ajax response cross-domain?

I am trying to make a single ajax response cross-domain. Is that possible? I tried something like this, but that did not work: function my_call_callback() { header("Access-Control-Allow-Origin: ...
0
votes
1answer
22 views

How to SELECT number from table and use in calculation . Unsupported operand types

This is the PHP part of an ajax request. The user enters two numbers, via two fields. I can add these two numbers together & display the total in a field, this works OK. However, I would also ...
0
votes
1answer
383 views

Wordpress plugin: admin-ajax.php not passing data to custom function

n this basic plugin skeleton, I am trying to get the data sent by ajax to wordpress admin-ajax.php to be processed by a custom function. It looks like the data send from the form does not reach my ...
0
votes
3answers
375 views

Wordpress plugin: render only page content using ajax call

I'm writing a plugins that renders json data from an API request and I need to implement an infinite scroll in a content page. The problem is when I render the content with an ajax call, it renders ...
0
votes
1answer
59 views

how to use get_field_name in external ajax handler

I am loading new form fields from Ajax when I click on radio button in my custom widget. In Ajax callback handler, I need to use get_field_name and get_field_id widget class methods. get_field_name ...
0
votes
1answer
61 views

Disable Ajax for Spiders

We have a site on wpegnine that gets about 20k visits a day and heavily depends on ajax for our inbound marketing strategy (lead/visitor processing). These ajax calls are killing our server ...
1
vote
0answers
39 views

Voting comparison plugin gets stuck in a loop, stops generating new votes

Edit: cut down the text drastically, sorry about that! For some users, at some point it will suddenly stop loading new votes for them, either looping the same one over and over or the same set of ...
1
vote
0answers
174 views

jQuery and AJAX Not working with Select Form Element

I seem to be having a strange issue with jQuery and a newly-created AJAX form/function. I'm pretty new to AJAX so please bear with me. Here's the jQuery: ...
0
votes
0answers
44 views

SHORTINIT and sessions

Is it possible to use SHORTINIT for AJAX called php file and use a Wordpress shared $_SESSION global in it? I have this thus far: ini_set('html_errors', 0); define('SHORTINIT', true); require ...
0
votes
0answers
181 views

Stop auto load wp-admin admin-ajax.php

I have a multisite. I want to stop autoload wp-admin/admin-ajax.php. As I have search in google. I have found out option heartbeat. But it reduced the request. <?php add_action( 'init', ...
-1
votes
3answers
74 views

AJAX in wordpress theme loop

I'm trying to make a AJAX request on my theme. I already know wordpress handle AJAX very well, but not directly on theme file. It uses admin-ajax.php for this. I working on this for a long time and ...
2
votes
1answer
90 views

admin-ajax.php vs .load() in WordPress

I'm developing a theme and I want to ajaxify each internal link in my theme. Uptill now, i've used admin-ajax.php method successfully for these actions ... 1: Load More Posts for Blog with Ajax 2: ...
0
votes
1answer
177 views

is_singular() not working if called via callback function of admin-ajax.php

In my single.php I've some code like this ... if(is_singular('post')) { echo 'Blog'; } else { echo 'CPT'; } If I approach single.php from blog or CPT index page by using the_permalink(), ...
0
votes
0answers
12 views

Content not retrieving on .load jQuery function [duplicate]

I`m trying to get posts from a wordpress query_posts external php file via .load jquery function. I`m getting the correct html code, but the wordpress loop part of the code is not loading. My code ...
0
votes
1answer
65 views

Ajax, jQuery and Wordpress

I'm having trouble getting AJAX and jQuery to work with WP, and wondering if someone can point me in the right direction. I have a form, and I want to pass the data from the form to a PHP function, ...
0
votes
0answers
29 views

How to manage SI Captcha redirections after submitting (with or without errors)?

As reported on the title, is there a way to manage the submitting of a comment in all the possible scenarios? no inserted comment (NO COMMENT) wrong captcha (NO COMMENT) comment and correct captcha ...
0
votes
0answers
555 views

wp_query->max_num_pages always returns 0 on custom post type

Hi there I am developing a theme where I have to load some posts with ajax, in my index page everything works properly, the problem is when I need to use it on custom post type, I pass the values for ...
0
votes
0answers
24 views

Check for new posts in the loop every x mins/seconds

I'm trying to think of a way to check for new posts in the current loop (e.g. author, or tag) using ajax to give a live blog feel without reloading the whole page. Is it possible to 'fire' the loop ...
0
votes
0answers
41 views

reCAPTCHA is not visible on comments loaded via ajax

I've a php template loaded on a popup and this template should contain on the bottom the possibility for a user -logged in or not- to write comments. for security reasons it was installed the plugin ...
0
votes
1answer
60 views

Retrieve WordPress' the_content() with jQuery

I'm trying to load some additional images when the user clicks a button. At the moment, I have the following function: $('a').click(function(){ $( ".gallery-pop-up-container" ) .load( ...
-1
votes
1answer
40 views

Wordpress & Ajax

I'm creating a plugin and I want to implement drag & drop capabilities that save the order of li's in a list and then displays that list on the front end of the website. I may be a little over my ...
4
votes
2answers
214 views

How to process ajax requests correctly using ajax plugins

I've been stuck on this topic for a while. I followed Pippin's tutorial . According to a 2nd wordpress developer who I got advice from, this tutorial is now out of date/ not appropriate. He told me ...
0
votes
1answer
250 views

Using Jquery submit with ajax request

When the user clicks the 'submit' button on my form, I would like 'this will be echoed back' to be displayed within an alert. The only JS console error I get: Failed to load resource ...
0
votes
1answer
437 views

Uncaught ReferenceError: the_ajax_script is not defined . How is this not defined?

I'm using this example as a guide link to ajax example i'm using to my plugin example. I get Uncaught ReferenceError: the_ajax_script is not defined in the JS console . I've put my JS in the main php ...
2
votes
1answer
209 views

Wordpress Ajax Login without page reload

I'm currently developing a Wordpress theme where I want the user to be able to upload images before he register or log in to the site. The initial problem was, you can´t upload images to wordpress ...
0
votes
0answers
35 views

remove_action(“wp_ajax_function”, “function”); not working

I have the following code in a file called contact-form.php. The file lives here: wp-content/themes/NAMEOFTHEME/ (premium theme) function theme_contact_form() { // some code here (send mail when ...
0
votes
0answers
401 views

WordPress - admin-ajax.php returns 502 Bad Gateway

I'm getting a 502 Bad Gateway error for wp-admin/admin-ajax.php -- this is a WP site, hosted on WebFaction, which is using nginx. Where it most obviously crops up is when adding a new post or page, ...
1
vote
0answers
77 views

First Attempt at AJAX and it keeps getting Canceled. Can't Get Results to Show

This is my first attempt at Ajax. I've got it working in the fact that the database gets the record inserted properly, however, once that's done it won't return the response that I've set up. Its as ...
1
vote
1answer
844 views

Delete row of custom table in WordPress using AJAX

From my custom table ($table = $wpdb->prefix . 'user_req';) I'm showing data with $wpdb->get_results() and a foreach loop: I managed to update the database with the individual values from the ...
1
vote
3answers
707 views

Conditional success callback based on Ajax Response not working

I am trying to run an ajax request to pass some data to a function I have written. I return the response, and try and run some javascript based on the response, but it doesn't seem to be running ...
-3
votes
1answer
50 views

ajax for visitors wordpress

I have this code that does ajax in wordpress it is working fine in admin page but i want it work in the main page of my theme <?php add_action( 'admin_footer', 'my_action_javascript' ); ...
0
votes
0answers
403 views

Redirect all page templates to index.php and turning Wordpress into a Single Page Application CMS

I’m trying to push the boundaries of Wordpress by turning it into a SPA CMS. Everything works fine until now except for a redirection issue. github angularpresstheme How it works: When I create a ...
0
votes
0answers
217 views

List posts in a select tag and display the_content of the selected option

I would like to create a select tag with posts from my custom post type and then, when an option is selected, I need to get the_content() from that selected post by its ID and display the content ...
0
votes
1answer
211 views

insert query on a custom table using ajax with jQuery plugin Jeditable

I've read tons of post already but found no solution... I'm tryin to implement Jeditable functionality in a plugin with this code: jQuery(document).ready(function() { ...
0
votes
0answers
72 views

How to have post permalinks redirect to index.php with parameters for loading the content via AJAX?

That question is a bit of a mouthful, so allow me to elaborate: I'm using Wordpress as the CMS for a portfolio (each project is a post in the same category, 'work'). I'm displaying the posts using ...