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
466 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
227 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
205 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
54 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
142 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
376 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
239 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
100 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
155 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
146 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
177 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
121 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
1k 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
332 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
110 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
194 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
853 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
536 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 ...
0
votes
1answer
509 views

Get the_content with ajax

I'm using WordPress (WP) as the backend for an app that delivers content on a map. I've been trying for a couple of days to get my head around AJAx in WP and have found a good tutorial I'm trying to ...
0
votes
0answers
230 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
789 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
484 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
81 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
608 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
51 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
56 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
598 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
727 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
695 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
88 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
109 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
240 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
45 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
381 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
74 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
79 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
193 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
308 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
143 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
280 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
95 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
801 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
231 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. ...