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
1answer
196 views

Show selected images on top in Media Manager

I've searched numerous StackOverflow and Wordpress Awnsers questions, but I couldn't find any solution that matches my situation or even remotely points me in the right direction. I have a custom ...
-2
votes
2answers
323 views

Can admin-ajax.php be used for spam purposes? And if yes, how to prevent that?

Today I've got a letter from my hosting provider that admin-ajax.php script had been sending spam until it was blocked. About two thousand spam messages were sent to different emails. I know if you ...
1
vote
1answer
1k views

Ajax request returning full page code

I'm having a bit of an issue with an ajax call on a site I've just taken over. I've used similar calls before on other sites so not sure if it's a plugin restriction or conflict but any ideas are ...
0
votes
2answers
77 views

Serve a different theme based on window size

What do you think it is the best approach to load a theme based on current window size of the client? I am not necessarily talking about resizing, but only about the size at the first load time. I ...
2
votes
2answers
152 views

Adding callback function for wp_ajax_ has no effect

I was trying to add one more callback function to the WordPress AJAX action woocommerce_apply_coupon. This action is defined in the WooCommerce plugin, I want to add my own callback function to this ...
0
votes
1answer
294 views

Change theme based on window size

I want to send a browser info (window width) to the server via AJAX. The server doesn't need to respond with any data, however, only change the theme based on that window width. This is my attempt: ...
0
votes
1answer
96 views

PHP: How to access db the right way in plugin?

I thought I would find an answer to my question on the internet but I was not able to. This is not a big question, but as it is my first plugin, I want to make sure that everything is right before ...
0
votes
1answer
97 views

Wordpress plugin ajax post parameter

i have problem. I don't know why but my paramters from form don't pass too aad_process_ajax(). My code from functions and jquery: Function with my form: function aad_render_admin() { ?> ...
0
votes
3answers
833 views

Wordpress Ajax always returns a 404 error

I just got this code from a tutorial. I can't seem to get it to work. HTML (home.php) <form name="myform" id="myform" action="" method="POST"> <!-- The Name form field --> ...
0
votes
0answers
59 views

How to retrieve the user_id of the person who just registered with Gravity Forms?

I have a form embedded in a set of jQuery UI tabs. The Form registers a user: I need the user id to store info into a database, so I use this function: add_action("gform_user_registered", ...
1
vote
1answer
242 views

Fetching more posts in Wordpress via AJAX

What's the best way to fetch the next page in post archives and other lists like search results? This question has been asked many times already, but the answers not good enough for me. So far, I've ...
0
votes
1answer
58 views

How to use several wp_ajax_ functions for different queries?

I am working on getting multiple functions to work with wp_ajax_ and the first two functions fire just fine. However I have the need for a completely new query that will take advantage of AJAX also. ...
0
votes
0answers
40 views

Options not being deletd via ajax in wordpress

I have this fucntion which is called via Ajax to delete an option based on the name passed in. function uncheck_package(){ if(isset($_POST['element_value'])){ $element = ...
1
vote
1answer
76 views

Why is this Ajax not working?

I'm not sure if I am abusing WordPress and Ajax by doing it this way but WP and Ajax Codex a well as Plugin Development with Ajax do not seem to be very helpful. I have created the following Ajax ...
0
votes
0answers
23 views

Translate Post Content

I'm running a blog with lots of images and some descriptions written in Italian, most foreign visitors complain that they do not understand what's written, I've lost many of them.. I was thinking to ...
0
votes
1answer
926 views

Loading shortcode with ajax

I'm trying to load a slideshow if the browser is a certain screen size - i.e. I don't want the slideshow to load on smaller, mobile screens. The slideshow plugin provides a shortcode: <?php echo ...
0
votes
1answer
436 views

Get post id on click of thumbnail

I am a little lost so I apologize if this question is vague and not organized well. I currently have a grid of thumbnails populated via Wordpress. I retrieve them by getting all the posts in a ...
1
vote
0answers
147 views

Fancybox type popup window that's not an iframe

I'm a bit stuck and need some help to get me going in the right direction. I'm trying to do something similar to the lightbox style popup on this website: http://cargocollective.com/montessori I ...
0
votes
0answers
59 views

Add AJAX to Wordpress Admin Bar

I am trying to create a way for the admin bar (in particular, the Notifications notifier) in BuddyPress to auto-refresh every x (probably 20) seconds using AJAX. If possible I'd also like to do this ...
0
votes
0answers
86 views

Objects and get_post_meta() gives me 1 string for latitude and longitude

I am using Geo Data Store plugin and sending my post's lat/longs to AJAX. Everything is available via return Object and working fine except the lat/long is in one string. This must be a common ...
0
votes
0answers
114 views

BuddyPress AJAX doesn't work despite buddypress.js enqueued and ajax calls being made

I have BuddyPress 1.8 and WordPress 3.5.2, along with bbPress and many other plugins Since BuddyPress switched to a new template handling system from 1.7, there was no longer need for BuddyPress ...
0
votes
1answer
268 views

Create WordPress posts from JSON array using plugin in admin

I'm writing a WordPress plugin that I'd like to do the following: Add a WordPress plugin admin page that contains a button When you click the button, it loads an array of JSON objects from a file, ...
0
votes
1answer
341 views

Refresh loop of custom posts (div) after new post is published

GOAL Wondering if following should be done, I would like to (ajax?) refresh not necessary only (custom) post type loop or div example custom post query : <div class="refreshed posts"> <?php ...
1
vote
1answer
2k views

Updating custom post meta with ajax

This AJAX function gets called on a click: $.ajax({ url: 'site/ajax.php', data: {id: $('section#single article input:last-of-type').attr('value'), cote: 'like'} ...
-1
votes
1answer
1k views

AJAX - Returning Two JSON Objects with One PHP Function

How would I go about returning two JSON objects with one AJAX call and PHP function? Any help is much appreciated! Here's the PHP function: function get_ldap_attr() { header("Content-type: ...
1
vote
0answers
34 views

Using ajax on editing a category edit page?

add_action ( 'edit_category_form_fields', 'tag_category_fields'); add_action ( 'edited_category', 'save_tag_category_fields'); add_action('wp_ajax_my_action', 'tag_category_fields'); function ...
2
votes
1answer
75 views

$wpdb->update has finished saving trigger?

I have a custom table that I am updating via wp_ajax action. I am inserting a row and inserting all of the values other than id which is an AUTO_INCREMENT. I have an ajax response that creates a new ...
0
votes
0answers
55 views

Use WordPress Ajax in Plugin

I trying to create a wordpress sample plugin with ajax base. I read out the tutorial and did plugin(is not working) Because i am new to ajax. Here is the code i tried is of form data in a ajax way. ...
0
votes
2answers
1k views

Stumped - Ajax Response Returns 0

I can't seem to figure it out. No matter what I do, the ajax call keeps giving a 0 response. I've tested my PHP funtion and it works fine but whenever I call it through ajax I receive nothing (only a ...
0
votes
1answer
150 views

Update Custom post field by Ajax on cached site

My site cached by "wp-supper cache" plugin and "cloudflare.com" So my php function to count post views working incorrectly. I try to use ajax for it but I'm noob with JS code so I can not know where ...
0
votes
0answers
76 views

Ajax call activate after submit in edit-tags.php page

Is there a proper way to activate a ajax call in wordpress in the edit category page after the submit is pressed?
0
votes
1answer
644 views

gravity forms jQuery.load into modal

I have a gravity forms contact form which resides on a page, but what I want is a site wide link, that will open up that form and display it in a modal, on the fly. One way to go about this would be ...
0
votes
1answer
352 views

Ajax url value to pass 'variable' to use in query

I am in the midst of modifying a plugin in which I wish to get a value from a select list and auto-populate a textarea with values based on the selected value. The php code come from a file named ...
0
votes
2answers
245 views

How to add a “ waiting” icon for an ajax in WP frontend?

This is my search js code for processing search : jQuery(document).ready(function($){ $('#searchsubmit').click(function(e){ e.preventDefault(); var searchval = $('#s').val(); ...
0
votes
0answers
261 views

admin panel save option with ajax

I create custom options in the admin panel but I have some difficulties to save it with ajax. I can't get the php script with action variable in ajax script. Here all my scripts: in functions.php : ...
6
votes
1answer
553 views

How to load wp_editor via AJAX

Does anyone know how o load wp_editor via AJAX in WordPress? My markup and editor is getting loaded properly but editor controls are not getting loaded properly, it may be because Javascript is not ...
0
votes
1answer
432 views

wp_localize_script, variable is not defined in jquery

I try to load a post with Ajax. functions.php: function my_action_callback() { wp_localize_script('jscustom', 'ajax_custom', array( 'ajaxurl' => admin_url('admin-ajax.php') ...
0
votes
1answer
237 views

load plugin with ajax [duplicate]

is there a way to load plugin with ajax? I want to load Quick Chat plugin which supports initializing with PHP and Shortcode [quick-chat height="400" room="default" userlist="1" ...
2
votes
3answers
2k views

Using Ajax with a Class file

At the moment I have an ajax that works (I get a success [200] response), but having an issue with the action hooks on the response. The JSON object is not coming back, instead I'm getting a 0. I ...
2
votes
1answer
2k views

failed to load wp-admin/admin-ajax.php

I'm getting this strange issue. Everything was working fine last day. Now suddenly none of my ajax requests work. The problem is (i found that in firebug console): failed to load resource : ...
0
votes
1answer
203 views

help on wp_editor via ajax load [duplicate]

So I have been spending hours trying to figure out how to make the wp_editor() work on an ajax generated content. I bumped into this post: Load tinyMCE / wp_editor() via AJAX and tried the solution ...
0
votes
1answer
599 views

custom autocomplete search

I try to implement an autocomplete search but I have some troubles to make it works correctly. When I write in search input some words, the autocomplete search doesn't filter the results and always ...
0
votes
1answer
286 views

How to get error object returned by wp_create_user

I'm creating a registration widget for my wp site and it works as expected, however if the user already exists I need a way of retrieving that information. I'm using ajax to make the call here is my ...
0
votes
1answer
157 views

wp_localize_script not create variable in head section

I try to make an ajax function in wordpress and I enqueued my script and declared my variables like this in functions.php: function my_enqueue_scripts() { wp_enqueue_script( 'load_post', ...
0
votes
0answers
108 views

Wordpress Ajax not working

I have updated wordpress 3.5.2 and using Elemen theme in my wordpress site. The problem i am having is in admin side Ajax functionality is not working. I have tried disabling all the plugins but that ...
1
vote
2answers
390 views

Jetpack Infinite Scroll - Add more then 7 posts each time?

By default, everytime the infinite scroll loads some more posts, it loads 7 posts. Is there a way to load more posts than just 7 each time?
1
vote
2answers
128 views

ajax, right way to do it and make it works?

I'm new to wordpress but have knowledge in php and javascript. I read a lot of blogs about ajax call in wordpress. I also read some posts on this forum. However, I still have some difficulties making ...
0
votes
2answers
1k views

Check if email address exists front end with AJAX in a plugin

I am pulling my hair out trying to figure this out. I have followed the wordpress codex here for AJAX: http://codex.wordpress.org/AJAX_in_Plugins All I keep returning is 0, I never get a 1. Any idea ...
0
votes
1answer
550 views

How to pass custom parameter to WP_Query for filtering in pre_get_posts

I have an ajax request that returns the result of a WP_Query loop. I would like to detect in pre_get_posts filter the specific wp_query instance that is used in the ajax handler. I thought placing ...
1
vote
1answer
254 views

MySQL select query with ajax

I am passing variable with ajax to list.php in my twentytwelve template. In list.php I am executing mysql select query but when I see in console I am getting this error: <br /> <b>Fatal ...