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

2
votes
2answers
1k views

ajax stopped working when not logged in?

Have had an autocomplete field working for months but has stopped working when not logged in? Not sure when but within the last few days or week (not updated wordpress recently). already have; ...
1
vote
0answers
97 views

Ajax from various plugins not generating responses (endless spinners) [closed]

This isn't a problem with a specific plugin, but with all of my plugins that use Ajax on the front-end (though surprisingly, none of the Ajax requests on the back-end are experiencing any issues). I'm ...
-2
votes
1answer
227 views

Can a scrollable date picker be done in Wordpress for archives?

I've been asked by a client to do this: But I have no idea how I would go about it, particularly in Wordpress. I searched around Google a bit, but it looks like this design was just lifted from an ...
1
vote
1answer
482 views

Update Loop with Form

I have a photo gallery I'm developing using WP as a means for content management. I'm relying heavily on some jQuery plugins to manage the UI styling and manipulation (via sorting). My problem is ...
0
votes
1answer
509 views

register_setting and AJAX?

Please pardon me if this question is totally unrelated in itself, but I'll do my best to point out the issue I am having and what I would like to achieve. Scenario: I have a custom theme option's ...
6
votes
2answers
771 views

Can I use the same nonce for multiple requests on the same page?

Or does this break the purpose of the nonce, which I admint I don't quite understand it? :) For example on two ajax requests that run on page load, or when something is clicked: $.ajax({ type: ...
5
votes
2answers
3k views

Ajax and autocomplete

I got a set of meta boxes on a custom post type. Two of them are simple input/text-type fields, that should have autocompleted input: A) Another Custom Post Type B) Users Now I have the problem ...
1
vote
1answer
485 views

AJAX search posts and pages

Im trying to make a plugin where i need to create an AJAX search. Im using the method described in http://www.garyc40.com/2010/03/5-tips-for-using-ajax-in-wordpress/ to perform the ajax calls. So far ...
0
votes
1answer
424 views

Right way to include blog-header.php?

I have a voting system on a custom post which uses AJAX, and I have a file that handles the AJAX request. This file is inside a sub folder named php of my theme. Hence the structure is: ...
0
votes
1answer
71 views

Custom loop attached to link

I have a custom post type named companies. When you add a new company you need to check if it's a leader or not, so I created custom metabox with two radios, one for "yes" and another for "no". In ...
0
votes
1answer
445 views

Display custom-post type based on the Title matching the current selected value

Ok quite a complex thing I'm trying to do here, and I'm a bit unsure how I will do it with wordpress, but I'm hoping some genius out there can help. I'm basically creating some comparison ...
1
vote
2answers
646 views

How to declare a JS variable in an AJAX call

I'm using: wp_localize_script( $handle, $namespace, $variables ); to declare some variables before the initial AJAX call is made, but I imagine I can't do the same thing again within a callback ...
1
vote
1answer
442 views

Wordpress AJAX - how to return true or false in the callback function

So I've set up AJAX with Wordpress properly, having followed some good tutorials, and it's working great. One thing I can't quite work out is how to properly return either TRUE or FALSE from within ...
0
votes
1answer
7k views

Using ajax on categories and wordpress loops

I want my index.php to be a simple page with a horizontal list of category names on the top. But instead of having the page reload with the list of posts in that loop each time a category is clicked ...
1
vote
3answers
518 views

Bind to WPSetAsThumbnail

is there a way to bind some extra script to the WPSetAsThumbnail function? the function automatically inserts the image into the post's metabox, but what if i wanted to do something else with it? ...
0
votes
1answer
1k views

ajax jquery update custom field meta value front end

There is probably a much easier way to do this. After much trial and error trying to get a postid from a url, I've opted to add the id to the permalink. However I have no idea how the custom value ...
2
votes
4answers
354 views

Conditional check for front-end which includes ajax

I need a conditional which exits if the context is not a front-end view including AJAX requests. I have this at the moment: if (is_admin() && !DOING_AJAX) return; The DOING_AJAX bit ...
1
vote
1answer
187 views

How to localize admin.php only once

I am creating a set of plugins that all use AJAX. Now localizing the admin.php in all the plugins seems to be a bit of an overkill. Is there a way to localize the script only once.\ Now I do not know ...
0
votes
1answer
627 views

Does wp_localize_script Call a Javascript Function or Simply Pass PHP Parameters to It

Easy question: I'm trying to understand wp_localize_script. Does wp_localize_script call a javascript function or does it simply pass PHP parameters to javascript? I want to pass php parameters to ...
0
votes
1answer
750 views

Ajax page load in wordpress the right way?

I tried something like the following but if the page I'm loading has javascript it's not running because the elements are created after page load. When the javascript is something I wrote I simply ...
3
votes
1answer
1k views

Custom column for changing post status via ajax

I'm currently trying to implent a new custom column at the page manage screen that will let me change the status (published/pending) of the different pages via an easy toggle link. From what I've ...
0
votes
1answer
818 views

How to fix: Clicking 'Quick Edit' link in Admin (edit.php) makes posts disappear?

When I'm logged in and go to the Posts management page (edit.php), if I click the 'Quick Edit' button, the clicked post disappears from the listing! This occurs in FF7 and Safari 5.1, running WP ...
1
vote
1answer
939 views

load custom fields on click

I have too much data stored in custom fields which I don't want to fetch on page-load, instead I'd give the user the opportunity to load the custom field values on click, possibly with ajax. Is ...
2
votes
2answers
369 views

How to correctly load wordpress in a non WP script for AJAX request

I want a script in my theme, ajax.php, which I want to load or access from other frontend pages using ajax. In ajax.php I want access to core WP functions such as get_posts(), do_shortcode() etc. ...
0
votes
1answer
673 views

how to json_encode(); the Loop content so that the encoded array is [“0”:content, “1”:content]

<?php $dVC=array(); query_posts('meta_key=featuredt&posts_per_page=5'); if (have_posts()) : while (have_posts()) : the_post(); $dVC []= $post->post_content;?> <div ...
1
vote
2answers
174 views

Retrieve post info within AJAX helper function

I have a button within a post which a user can click. Once clicked, an AJAX call is made. My question is, within my PHP AJAX helper function (located in my theme's function.php) how can I retrieve, ...
3
votes
2answers
1k views

Automatically pull newer posts and append to current page.

I have a page that currently loads posts of custom post type using regular WP_Query. The custom post type are for news articles. Newer news articles (posts) are constantly written, as such there is a ...
1
vote
1answer
119 views

Why do plugins that cause 'unexpected output' create AJAX problems?

I just had to fix an AJAX failure in the admin area (the search/attach dialog box in the Media Library wasn't working) and tracked down a plugin that was the culprit. On activation, this plugin was ...
0
votes
2answers
641 views

How to load previous or next attachment with jquery ?

When i am on the single.php page, i show the first image attachment. then i would like to load the next (and previous) image attachments without reloading the page. so in single.php i started with ...
1
vote
1answer
364 views

WP_Query on custom taxonomy works fine but fails if run through wp_ajax_

I'm using WP_Query to collate some info about posts based on their custom taxonomy. My arguments are as follows: $args = array( 'posts_per_page'=> -1, 'post_status' => 'publish' ...
0
votes
1answer
793 views

WordPress front end AJAX. Return 0 :?

I have create the appropriate code to handle AJAX request on WordPress but I get 0 as responce from the server. My plugin code is here: class my_plugin { function my_plugin() { ...
1
vote
1answer
239 views

Wordpress ajax problem need wordpress expert?

i want to call a function using wordpress ajax and i have done a code for that also. but when i fire a ajax call it always retrun -1. i dont know what is the problem can any body help me to solve. ...
0
votes
1answer
1k views

Post will not load via ajax

I have inherited a WP 3.2.1 site which uses prettyPhoto to load content via ajax. This was working before I enabled permalinks on the site. The Custom Post Type UI plugin is installed. I can browse to ...
1
vote
2answers
4k views

Using AJAX in a plugin to submit form - REALLY confused

Having a bit of trouble using all the Wordpress ajax hooks, and functions. Been reading this post: 5 Tips for Using Ajax in Wordpress But became confused after trying all the code and applying it to ...
3
votes
1answer
1k views

WP List Table custom quick edit box - post meta data missing and columns change on submit

I have extended class WP_List_Table to create a custom sortable table of posts along with a quick edit box with custom meta boxes. The meta boxes populate and save but when I click submit the field ...
1
vote
1answer
88 views

Wordpress Ajax Posting from App

I am working on an App for a University radio station that allows users to listen to the station and read stories from there wordpress site. I can do this functionality easy enough using RSS feeds. ...
1
vote
3answers
947 views

Determining whether it's a AJAX call from front-end or from back-end

I am developing an admin-only plugin, which uses some ajax calls in its interface. The website itself also relies on ajax calls on its front-end, too. I'd like to be able to identify when the WP is ...
1
vote
0answers
227 views

Suggestions for Developing a Flipbook Style Theme? [closed]

I'm currently working on a custom WordPress theme that will be a showcase of several different stories, "books" if you will, that contain individual chapters. I'd like to present each of the stories ...
0
votes
1answer
183 views

Can not call .php files after switching to %postname%

This $('#content').load("submenu.php"); works just fine with default permalinks When I switch to %postname% it does not work any more But, I can still go though to mysite.com/submenu.php and it ...
2
votes
3answers
2k views

jQuery AJAX form validation

I am trying to create a custom login page for my site, namely http://localhost/site/login, the problem I am running into now is that when the user tries to log in and enters the wrong username or ...
0
votes
1answer
472 views

AJAX calendar navigation returns -1

I am trying to pass $month and $year values via AJAX when previous/next links are clicked, but all I am getting is a -1 where the content should be. My JavaScript functions and AJAX call is located in ...
1
vote
0answers
735 views

$wpdb class updating meta_value using Ajax [closed]

I am trying to create a way to change the order of posts using a meta_key / meta_value that is updated using jQuery ui-sortable. I'm already using menu_order in the same way but need to create a way ...
0
votes
1answer
438 views

blocking the admin section (but still using admin-ajax.php)

I am building a community based WP site at the mo and have blocked anyone bar admins from using the admin section on the site with: add_action( 'init', 'sw_block_users' ); function sw_block_users() ...
1
vote
4answers
361 views

Wordpress Ajax not function as I expect… what's wrong?

In functions.php I have: function testajax() { echo "test"; exit; } add_action('wp_ajax_testthisajax', 'testajax'); add_action('wp_ajax_nopriv_testthisajax', 'testajax'); In scripts.js I have: ...
0
votes
1answer
2k views

Ajax mousedown call getting “cancelled” when clicking link

I'm trying to track registered user activity, specifically, when they click a link to a file for download. The filesystem plugin is WP-Filebase. I found that when I added a click() handler through ...
0
votes
2answers
2k views

Properly embed javascript into WP (using function.php) - doesn't work?

It seems that my contact form's ajax javascript and the custom.js that I'm using for my drop-down navigation are interfering with each other. The contact form's ajax fuction will only work properly ...
0
votes
2answers
758 views

Loading pages via Ajax and displaying titles

A small and possibly simple consultation. I'm loading pages via Ajax like this: jQuery("div.menu a").addClass("ajax"); var hash = window.location.hash.substr(1); var href = ...
0
votes
3answers
4k views

Ajax submit comments

I want to submit comments via ajax. CLick the comment submit button, comments gets posted via jquery's ajax method and the result ("Awaiting moderation...") is displayed on the page. I went into the ...
1
vote
1answer
337 views

is_page() conditional not working inside an AJAX function

I have a jQuery ui tabs that load posts via ajax on sidebar. Now in a specific page i want to filter the query post via is_page(); conditional. But in my case its not working. function ...
0
votes
3answers
5k views

How to load post content on index page using ajax when post title in sidebar is clicked

I'm working on a new blog which display in a list, on sidebar, some categories and the posts of them. In the index page, in main content, I list some post titles from other category "New". What I ...