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

How to pass more information though separate post keys via AJAX

I'm on the admin side of wordpress and therefore am using ajaxurl. Is there any way I can pass information through different keys. For example, like "extra" below... Ajax That's Sending The Data ...
0
votes
1answer
2k views

Ajax call always returns 0

I have a problem with AJAX returning 0 always! I have done everything by the book and can't figure out what is wrong? Please help!! Here is my Ajax call: //Pass data through AJAX var ...
1
vote
1answer
60 views

Ajaxing function in widget class

I want to ajax function declared in function Widget in widget Class ,it have arguments belong to the widget i try this code add_action('wp_ajax_my_func', 'my_func'); ...
1
vote
1answer
607 views

Ajax load more button in Recent posts widget

I create Recent posts widget and i trying to create load more button for it to get more Recent posts links by ajax ,is there any tutorial for how to make it?
0
votes
3answers
760 views

How to create a button click counter meta box?

I am trying to create button click counter meta box in a custom post type, but I can't get it to work. What I want to do is when a user click the submit button, then it will do update_post_meta in the ...
0
votes
1answer
743 views

wp_handle_upload returns empty error array

I am trying to do an upload via ajax and really dont want to use the regular wordpress media uploader. It is too much stuff and all i want to do is upload single image. I have everything working the ...
0
votes
0answers
92 views

sub domain ajax calls on multisite?

Does anyone know the best way to peform subdomain ajax calls on a multisite install, something like the following: http://a.domain.com ==> requests $(".area").load("http://domain.com/galleries/ ...
0
votes
2answers
2k views

Load page HTML content through AJAX

I'm currently building a single page style site that loads all content through AJAX, but will degrade back to a standard page load if javascript isn't present. I have done AJAX loading in the past ...
0
votes
0answers
110 views

Media Insert (Media Upload) doesn't work on author role in Front-End

I have a problem. In my front-end I have a Write a Post area, where users can write a post, and add their own images. I have inserted the media upload with wp_enqueue_media(); With my current ...
0
votes
0answers
270 views

Ajax request to admin-ajax.php and window.location.href

In relation to this question, I don't understand the meaning of: Instead of sending the ajax request to the admin-ajax.php, send it to the same url (using js window.location.href ) but including ...
0
votes
0answers
46 views

Ajax call & dynamic wp_head

My problem is just how to handle the head section when using ajax templates. My responsive template loads the right page-template with ajax according to screen.width. If window.width < 1080px ...
2
votes
1answer
403 views

Ajax template: how to handle head section

I know it's easy stuff, but I'm new to this and I can't understand which is the best approach. Background The template I'm working on is a dual theme Desktop/Mobile, UA Sniffing based. Now I just ...
1
vote
1answer
77 views

How to use JSONP to make AJAX request to different site on network

I am trying to get buddypress avatars on a network's main site from a sub-site. The way buddypress does avatars is really involved with loops and fallbacks etc and doesn't consist of any database ...
0
votes
1answer
81 views

How to include php-generated javascript?

I've looked around and have found no great solution so far: I would like to add customized javascript from a widget using wp_enqueue_script, but Wordpress seems to be limiting scope to the javascript ...
0
votes
1answer
201 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
340 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
82 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
161 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
301 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
97 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
99 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
873 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
255 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
24 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
975 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
453 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
149 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
60 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
87 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
118 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
274 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
343 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
77 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
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
151 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
658 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
383 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
265 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
269 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
586 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
444 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') ...