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

Jquery UI Datepicker via Ajax call, issue in hiding weekdays dynamically

This is my code: var hideweek; var day; var cloDays = new Array(); function initdatepicker(hideweek){ var splitWeek = hideweek.split("&&"); $.each( splitWeek, function( skey, svalue ...
0
votes
1answer
564 views

admin-ajax.php not loading anymore

I'm working on wordpress 3.6. Everything was fine but previous to launching the site the administrator changed the domain name. Everything remained in the same server. We didn't have to move any ...
0
votes
3answers
295 views

how to use ajax in plugin admin area?

I tried ajax to get some info a php inside my plugin.but getting error-call to undefined function. Ajax jQuery.ajax({ type: "POST", url: "<?php echo ...
0
votes
0answers
74 views

External Ajax pagination?

I am using the following code to display posts on my HTML and CSS site. <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> ...
1
vote
3answers
426 views

Why is admin ajax reloading my page

As far as I know I haven't used Ajax anywhere in my code. Yet, while debugging, I have breakpoints being hit with 'admin-ajax.php' at the root of the call stack. This second hit of my breakpoint ...
0
votes
0answers
42 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
850 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
47 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
550 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
613 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
523 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
75 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
99 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
150 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
39 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
306 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
62 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
64 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
144 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
247 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
732 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
66 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
123 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
194 views

change theme based on window size - Send client window size using AJAX to the server

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
87 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
86 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
576 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
54 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
162 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
48 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
37 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
70 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
21 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
516 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
311 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
132 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
51 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
76 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
97 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
227 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
308 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 ...
0
votes
1answer
1k 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
614 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
33 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
67 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
49 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
605 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
0answers
114 views

Loading all gallery images in home using ajax

I want to automatically load all the pictures from the galleries across the site (without having to specify IDs) in the home page. But I need to have control of behavior cause I don't want to load a ...
0
votes
1answer
137 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 ...