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

How to make a call to DO_ACTION on Select List Change

Within a wordpress page (that is using a default template), I have a select/drop-down field that, when the user selects an item, I would like to somehow have it trigger a do_action call, right at this ...
0
votes
0answers
60 views

Nonces and Cache

It's clear that form submissions and AJAX requests, especially sensible ones, need "nonces" to avoid certain exploits. However, with heavy use of caching systems it becomes harder to generate them ...
0
votes
1answer
26 views

Build and ajax plugin not work

I have this code on a plugin function ajaxp_init(){ /* * registro del script */ wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', ...
0
votes
0answers
77 views

Unable to show messages using 'admin_notices'

The plugin I am working on has a table in the admin area with a single entry corresponding to single row. The admin has an option to perform certain actions on the table contents one of them being ...
0
votes
1answer
936 views

(resolved) Constructing a custom login form using ajax (without plugin)

I'm attempting to use this tutorial WordPress AJAX Login Without a Plugin – The Right Way by Natko Hasic to build a login, registration and forgot password forms that handle everything, including ...
0
votes
1answer
34 views

Admin-ajax.php is dying “0” without processing function

I am trying to learn how to process AJAX requests in Wordpress the correct way. To do this I am adapting this tutorial to create a super simple AJAX request to place the ID of a post (from a link) ...
2
votes
1answer
463 views

Ajax with jQuery UI dialog not working

I am trying to update my custom database table when changes are made in a dialog box. The script for the dialog box and ajax call is as follows - jQuery(document).ready(function($){ $("td > ...
0
votes
2answers
1k views

How build a custom login/register form with error handling?

So, I'm working on a plugin in which I'm making a custom page containing a login form as well as one for user registration; I have the forms built and operational, below is my code. <!-- Begin ...
0
votes
0answers
111 views

I want to edit an AJAX Wordpress Pagination

I am using this code to be able to load my content using Ajax (loading content without refreshing the page). The code I found fades out the content and fades in the new content. I want to add the ...
2
votes
0answers
202 views

gettext does not translate when called in ajax

When loading content in gettext calls (__(), _e(), etc.) they translate fine when I render the page in the browser normally (PHP delivers the content to the browser), however when I make AJAX calls, ...
1
vote
1answer
483 views

do_shortcode inside AJAX callback

I have an AJAX callback function inside my functions.php file, which displays posts in a specific category. add_action( 'wp_ajax_ajaxified_function', 'ajaxified_function' ); add_action( ...
2
votes
1answer
1k views

WordPress AJAX Pagination with query_posts

I have a list checkbox categories, which when checked, use WordPress's admin-ajax.php to filter posts to the selected category. All is working great, however, I am struggling to get the updated ...
1
vote
0answers
161 views

Pagination with custom query, custom search form, single and pages, ajax and no plugins

I've read a lot of posts here about pagination with custom queries and tried the suggested answers (like this one). It seems however that my situation is a little more complex, and in the existing ...
0
votes
0answers
659 views

Load more posts with Ajax and masonry

I'm using this method to load more posts with Ajax: http://www.problogdesign.com/wordpress/load-next-wordpress-posts-with-ajax/ I'm also using masonry for the posts layout. Masonry works fine for ...
0
votes
0answers
58 views

Saving data when javascript state changes

how to save data using ajax in wordpress when there is a change in javascript variable's value ? Vimeo Video State Change - http://jsfiddle.net/bdougherty/HfwWY/light/ I'm trying to save the (video ...
0
votes
1answer
619 views

Using wp_ajax and wp_ajax_nopriv hooks

I want to send an ajax request and want to process it if the user is logged in. Therefore I want to use following two hooks, but I am not sure if I am using them correctly. Is it correct to use same ...
-2
votes
1answer
75 views

Loading post like facebook on scrool to bottom [duplicate]

I have a page to show my product, now i want to load further posts using "infinite scroll".
0
votes
1answer
83 views

How return normal search result using wp_ajax action for wordpress

I want the normal search result to be available when using the wp_ajax action. Is there a way to do execute the normal WP_Query for the parameters that are available in the current request? This is ...
4
votes
1answer
193 views

Using Backbone with the WordPress AJAX API

I'm attempting to build out a simple TODO plugin using Backbone and have run into an issue with the AJAX API. In order to get the correct AJAX call back you have to pass in the "action" parameter ...
1
vote
0answers
23 views

Different template for second page result for Ajax-loading new pages [duplicate]

Everytime I enter a posts page, index.php is called. Now on the site I load next pages (page2, page3...) with Ajax and insert the posts (just the posts) from the Ajax result inside my page. This works ...
0
votes
1answer
745 views

Accept AJAX call with serialized form data

I'm trying to pass a wordpress plugin some form data via ajax and it works just fine, unless the form data is serialized, then the server responds with an error message. I'm stuck with this for days ...
0
votes
0answers
176 views

wp_enqueue_script() doesn't work with AJAX

My problem is: I made an AJAX call using this code wp_enqueue_script( 'prefix-myscript-name', plugins_url( 'js/ajaxcall.js', __FILE__ ) ); I made the call and the AJAX just going fine. I used this ...
1
vote
2answers
155 views

Register Taxonomy earlier so it can be used in functions.php and admin-ajax.php

This is a follow up to this post, outlining why I can not use the get_terms function while in functions.php (actually calling via ajax/admin_ajax.php). I can grab the terms (custom tax) on any post, ...
3
votes
1answer
2k views

Execute one AJAX request after another AJAX request finished

One JS file is making an ajax call. Within the success of this ajax call another AJAX call is made. The second call checks whether the email has already been registered. If it has been then the ...
2
votes
1answer
159 views

Comment `Reply` link doesn't work if comments are loaded from ajax

I am writing a plugin that displays custom home page that is in fact only one post with comments. The first time home page is displayed by the initial call by php. Then user can click a menu button to ...
0
votes
0answers
309 views

Custom password reset using AJAX

I used this (great) tuturial 'WordPress AJAX Login Without a Plugin – The Right Way' to make a custom login form and everything works fine. But I could need some help building the same functionality ...
1
vote
1answer
67 views

Using an if statement in the theme customizer page

I am slowly but surely chipping away at my first wordpress theme. I tried to make all of the aesthetics have different options, but well categorized so it is not overwhelming. So in my theme ...
0
votes
2answers
117 views

How is it possible that the function of the test page works, but it does not go live?

I want to load the new entries without reloading the page. I found a great solution for: The ajax script: <script> $(document).ready(function() { var refreshId = setInterval(function() ...
4
votes
1answer
178 views

Why does WordPress add 0 (zero) to an Ajax response?

Unless I end Ajax processing function by exit() or die(), the Ajax function receives desired and correct output but following by 0. Any idea why is that happening? Is that meant to be like that or ...
0
votes
1answer
168 views

Ajax Form seems to post, but does not return

I have a very simple form with 3 checkboxes allowing users to flag a video as inappropriate. I'm trying to make a simple ajax request to create an email, and give the user some feedback. The form ...
1
vote
1answer
125 views

Plugin: AJAX query external API to sync to tables

I'm wanting to write a plugin that hooks into an external API and syncs to a couple of database tables some information. I want to do this in a best practice way if there is one. I want the user to ...
1
vote
1answer
49 views

Ajax custom search not functioning as expected

I have a custom search I have created that is handled by an ajax call. It functions correctly for the admin but not for non-admin, but logged in, users. Admin will get the expected results returned. ...
0
votes
1answer
333 views

delete post meta by AJAX

I make meta box to delete a specific post meta key for the post by AJAX i make a button when click , delete the key from DB by AJAX add_meta_box('delete_test_key', 'delete test key', 'testdel', ...
0
votes
0answers
219 views

Ajax WP Query Search Filter

Everything is working great with this Plugin. http://wordpress.org/plugins/ajax-wp-query-search-filter/ I created a search form. When i click submit Search button it displays the results in default ...
1
vote
1answer
181 views

Retrieving JSON data in ajax request from media uploader

I'm having some problems getting my JSON data that's being passed via an ajax request. I'm trying to implement the media uploader into a plugins settings page. I've got it functioning properly using ...
1
vote
0answers
52 views

Issue understanding and using WordPress filters and actions

I have a custom WordPress plugin that I have developed. The plugin is a widget bundle containing a bunch of custom widgets. The scenerio The plugin allows for custom css styles through creating a ...
0
votes
1answer
119 views

Using admin-ajax prevents regular php form submission

I have a page with a table of posts and groups of checkbox filters in the sidebar. Looks something like this: www.example.com/toylist |___________| |_______________________| | [ ] Red | | ...
0
votes
3answers
244 views

Dynamically switch template on click

I have a custom post type setup with a couple custom fields. I am creating a page where I display all of the custom post types, except I want to have multiple views. See the examples below. One is a ...
1
vote
1answer
175 views

WordPress AJAX calls not detecting language properly?

I have a WordPress multisite, which is in both english and french. On the french site, localization is working great (using date_l18n() for dates, and __(), etc. for the rest). When an AJAX call ...
0
votes
1answer
85 views

Do I require the use of nonce?

Im creating a visit/page views counter with ajax,jquery and php, I have been reading a few articles that recommend the use of nonces for data manipulation through ajax, however i am not sure if i need ...
0
votes
1answer
122 views

Wp ajax not working from “current_screen” admin hook

I have a class that is doing some backend work ( enqueening css and js files creating metaboxes, registering ajax hooks etc...) Everything works fine when I just include the files. The problem is ...
0
votes
0answers
120 views

How to respond with WP_Ajax_Response();

I'm using WP_Ajax_Response(); to respond to some ajax and output it to a div, everything works great. But how exactly do I respond if I want to output some php in to a div? A wordpress loop for ...
2
votes
1answer
151 views

Is there a hook to process a backbone restful PUT request inside wordpress?

I play around with Backbone.js (Great !) and want to synchronize my model data with the wordpress ajax api (3.6.1) on the server-side. Adapted to this ...
1
vote
1answer
104 views

wp_insert_comment and security

I am using wp_insert_comment to offer an in-house better ajax conditional comments interface. i got it all working great. my only question is. What security measures should i take to make sure i ...
0
votes
2answers
678 views

jquery & ajax sending data to php

In my jquery script I have; jQuery.ajax( ajaxurl, { action: 'lu_ajax', status: 'enabled' }, success: function (a) { alert(a) } In my file.php ...
0
votes
2answers
198 views

Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)

I've searched a lot for this and I seem to get different answers. In my situation, my jQuery function has to use a PHP variable from a different file. How can I accomplish this? Clear and simple ...
0
votes
1answer
107 views

Custom filtering on month value only of an entire date field

I'm using the plugin Ajax WP Query Search Filter (http://wordpress.org/plugins/ajax-wp-query-search-filter/) to search some custom posts I've created. The filter works great on three custom ...
0
votes
0answers
184 views

The right way to update Front-End user profile fields individually?

I'm designing a Front-End user profile page, allowing users to view and update their own profile information. I have the template page made, with the code to edit the profile fields as a whole from a ...
0
votes
1answer
675 views

Getting a variable using $post ajax back from php to js response in WP

I have this in my JavaScript part: $.post( WPaAjax.ajaxurl, { action : 'my_php_action_to_do', }, function( response ) { alert( response.mycode ); } ); and this ...
1
vote
1answer
171 views

Why is my AJAX call not working?

I have similar code working from within a theme's functions.php file, but I want to move it to a plugin. I've assembled the following but for some reason, this method is having trouble at the AJAX ...