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

Adding wp_ajax to a theme outside functions.php (on specific template page)

I'm doing a function which requires the use of the wp_ajax action. I've followed this guide to set it up with the differences of adding the requesting the object AJAX file in functions.php and also ...
0
votes
2answers
669 views

include wp-blog-header not working on MAMP

To clarify my question... My plugin is/was using AJAX to call the file pluginname/submit/pick.php My pluginname/pluginname.php contains the usual plugin header and wordpress automatically finds it. ...
5
votes
1answer
2k views

Ajax in a settings page (update_option is undefined)

I'm making a request to my plugin's php file via ajax and it's supposed to save some data with update_option(), but php throws an error: Call to undefined function update_option() I'm guessing that ...
0
votes
1answer
1k views

Change Query Arguments (filter) with jQuery/Ajax or PHP?

I have a pretty complex wordpress-site for travelling. There's an "archive-hotels.php", a template for the custom-post-type "Hotels". Inside the CPT is a taxonomy called "City", so we can do this: ...
0
votes
1answer
472 views

wpquery via ajax

I can reload my page and have php write a new wpquery and replace the content on my page, but I really don't want to deal with a new page load. Is there an easy way to send a wpquery string (eg "p=7") ...
0
votes
1answer
191 views

Parsing post->ID in included plugin file

running into something that has got me completely puzzled. I have a plugin with a main file that looks like this: // Global Variables $mouldings_prefix = 'mouldings_'; $mouldings_name = 'Mouldings'; ...
0
votes
1answer
978 views

Register Template

I created a register template for Wordpress with some ajax so that users can click on the register link in my header and the register form opens up in a lightbox. For some reason on submit, if there ...
0
votes
1answer
500 views

How to make image in TinyMCE clickable

I'm trying to use the tinyMCE in the Wordpress front end and not using wp_editor() because I need the editor to be created through Ajax (something that a wp_editor can't handle as far as I know). ...
11
votes
3answers
2k views

Load minimum WordPress environment

I made my own upload service for my website that is separate from WP, but uses WP to provide low level db functions and user verification. To do that, I include wp-load.php in my main script ...
1
vote
2answers
473 views

Why plugin ajax response is -1?

I do not know why this response me -1 always? I am using this code in my plugin file. i want response on click p tag <?php function myajax(){ ?> <script type="text/javascript"> ...
0
votes
1answer
172 views

Add Ajax to rating button

I have a ratings button in WordPress that outputs the number of people who rated the post. Is it possible to add the Ajax functionality so it doesn't refresh the whole page just the button number? ...
5
votes
1answer
690 views

Make a video post redirect to next post after completion

I want to make video posts redirect to the next video post in it's category after it's over. I use both youtube videos and directly uploaded videos both of which I already know how to pull the ...
1
vote
2answers
542 views

how to set beforsend option in wordpress ajax methods

How do I set the beforesend option in WordPress AJAX? I want to show loading option. This is my code: function showmyvideos() { var datas="data"; var data = { action: 'my_vids', ...
0
votes
1answer
3k views

How to use ajax to get multiple outputs?

jQuery.ajax({ type: "POST", url:"wp-admin/admin-ajax.php", data:'action=nafham_list_cats_selection&selection_id=' + $selection_id, ...
1
vote
1answer
619 views

Ajax requests with different WordPress Address and Site Address setup

I have a user using my plugin with the following wp setup WordPress Address (URL) http://server1.theirhost.com/~acct/somewebsite.com/wordpress Site Address (URL) http://www.somewebsite.com I am ...
0
votes
2answers
358 views

AJAX call - failling to call do_action

I am trying to make an AJAX call for a plugin. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script ...
0
votes
1answer
1k views

Ajax (jquery) wp_query pagination returns -1

I am currently developing an ajaxified theme for wordpress. I am listing the posts in a particular category, but the pagination returns -1 when clicked. Lets say I set showposts to 3 and a particular ...
7
votes
3answers
15k views

Admin ajax request return 0 with die()

So i'm using this configuration for an AJAX call in the administrative area (like this): add_action( 'admin_head', 'ajaxPerNgg' ); function ajaxPerNgg(){ ?> <script type="text/javascript" > ...
0
votes
1answer
1k views

Fatal error: Call to a member function query() on a non-object in my ajaxpage

i am creating a new plugin,i got this error Fatal error: Call to a member function query() on a non-object in my ajax page. how to solve this error. this is my code: if ...
0
votes
1answer
479 views

Allow access to stand-alone php file Wordpress

I am developing a wordpress theme and I want to use jQuery.load() to load data from a PHP file in my theme directory called process.php to a div in a wordpress page template. I haven't had any issues ...
0
votes
2answers
538 views

Page reload occurs before request finishes

I wrote a plugin to send an invitation to a friend and am submitting a form using AJAX and used the tips talked about in 5 tips for using AJAX in wordpress and another article referenced in the AJAX ...
0
votes
2answers
961 views

Ajax call in wordpress not working for subscriber user

All In my application there is notification system, when user click on that icon I want to make ajax call. The problem id it works fine for admin user (Debug : 200 ok), but not for subscriber user ...
2
votes
1answer
725 views

How to create a specific frontend URL (not a Page) from a theme or plugin?

My theme implements an AJAX action that returns some dynamic content and needs some functions from the Wordpress environment. How can I construct a URL for the AJAX call in the most elegant and robust ...
0
votes
1answer
44 views

How to make pages that arent indexed for ajax applications

I'm using a content section on my homepage to switch through multiple loops with ajax tabs and to do that a tutorial told me to make multiple pages and assign each page with a different template which ...
1
vote
1answer
228 views

Using AJAX in wordpress theme

all In my theme there is a notification at top. After user login he can see the notification update. when click on notification i want to make change in database alert field value 0 to 1. My ajax ...
10
votes
3answers
791 views

How to make comments work for a post loaded per Ajax?

I am currently loading a single post using ajax. While the post loading works ok, I cannot get the comments to load. Here is my code: My javascript to load the post: <script> ...
3
votes
1answer
12k views

Why is a 500 error generated by admin-ajax.php not going into the Apache error log?

I'm getting 500 errors with AJAX on the admin side. However, these errors aren't being logged in the Apache logs so they're rather hard to debug. Is there some way I can find out what they are? ...
2
votes
2answers
411 views

Wordpress theme ajax have_posts()

My goal here is to load the blogroll into my theme via ajax. But all that I can get as response is 0 (if I omit the die() line, else I get a blank response). Here is my code: js ajax: $.ajax({ ...
2
votes
2answers
1k views

Unable to get_the_content(); of a post in Wordpress via AJAX

I'm trying to ajaxify my Wordpress theme and I use the method described here and I'm now trying get_the_content of post via functions.php. Using jQuery, when I do alert(data) I get the 'title' echo ...
4
votes
1answer
2k views

wp_get_attachment_image returns different image size

It is a bug? wp_get_attachment_image( $attachment_id, 'post-thumb-size-small'); Same code, called in template, and in AJAX call returns same image SRC, but different image width and height. dumb ...
0
votes
1answer
65 views

Tabbed feeds with ajax vs. without on homepage [closed]

I have a tabbed section on my homepage where I call different feeds for new posts by category of my site much like the new youtube layout. I have 10 different feeds so my question is how important is ...
1
vote
1answer
239 views

How to post form in ajax mode and handle it in wordpress

currently I can only do it in a normal non-wordpress way. So, does wordpress provide a solution for this circumstance?
0
votes
3answers
171 views

Trouble After Update, Removing Plugin

I'm editing this site http://www.millermusicproductions.com/ currently and I updated WP 3.0.1 to 3.3.1. After updating, the page now is zoomed in compared to how it had been and I have no idea why. ...
4
votes
3answers
451 views

WordPress function that makes HTML safe to be sent via AJAX request

What is correct way to send HTML back to an AJAX request in WordPress? I currently have this: add_action( 'wp_ajax_nopriv_get-location-info', 'sc_locations_get_location_info' ); add_action( ...
0
votes
1answer
1k views

Problem running Ajax in Wordpress

FIXED I changed this: wp_enqueue_script( 'pfxconversion', plugin_dir_url( __FILE__ ) . 'function.js', array( 'jquery' ) ); wp_localize_script( 'pfxconversion', 'MyAjax', array( 'ajaxurl' => ...
1
vote
1answer
1k views

jQuery ajax call throws an HTTP 302

I'm trying to implement a jQuery Autocomplete where the Autocomplete gets its data from a ajax source. However, for some reason when I make the call it results in a 302 which in turn results in a 404. ...
1
vote
2answers
2k views

wp_localize_script escaping my url - fix or alternative

Here is my wp_enqueue_script and wp_localize_script - which i am using to run an Ajax call. wp_enqueue_script( 'function', plugin_dir_url( __FILE__ ) . 'function.js', array( 'jquery', 'json2' ) ); ...
0
votes
1answer
155 views

Ajax request sends url rather than data

I have a very weird error running on my plugin. I am currently developing a plugin that will allow the user to create routes and specific dates for the route. The dates are more or less tickets that ...
36
votes
2answers
10k views

Ajax takes 10x as long as it should/could

I have just hit my first serious issue with WordPress and for someone that enjoys Ajax this is a biggy. I have an Ajax request that is taking 1.5 seconds to complete while using the Ajax API. If I ...
1
vote
1answer
218 views

Plugin for loading comments on-demand [closed]

Is there a plugin which would allow visitors to load comments when they want to, rather than always showing them by default? Preferably through an AJAX call or something to prevent page reload. I'm ...
0
votes
1answer
388 views

Problem with ajax plugin for refreshing posts

Im using a cool plugin called "wp ajax random posts". It basically lets me call a function into a template that can auto refresh a loop of posts. It works great until I tried to change the loop ...
0
votes
2answers
856 views

How to use Jeditable plugin with admin-ajax.php?

Jeditable is saving data to the file like: $('.edit_area').editable('http://www.example.com/save.php', { type : 'textarea', cancel : 'Cancel', submit : 'OK', ...
0
votes
1answer
116 views

Problem loading ajax in the header

Im using this tutorial http://digwp.com/2009/07/display-a-random-post-with-ajax-refresh/# to create a section on my homepage where I can refresh a section with ajax. I have it all setup but the post ...
5
votes
2answers
2k views

How-to implement admin Ajax inside an admin WP_List_Table?

I am new to WordPress if someone will help me I will be very appreciate. There is parameter ajax "true" but in docs. wasn't said how to implement Ajax using WP_List_Table Class? parent::__construct( ...
3
votes
1answer
2k views

How-to debug wp_ajax_* hook callback?

I'm currently developing a plugin that uses ajax functionality. Problem: The callback isn't fired = no data gets processed. if ( ! is_admin() ) add_action( 'after_setup_theme', array( ...
0
votes
1answer
52 views

Trouble Removing Plugin [closed]

I'm editing this site http://www.millermusicproductions.com/ currently and I am trying to get rid of the login in the upper-right corner. I go to plugins and deactivate a plugin called "Login with ...
0
votes
1answer
110 views

grab or load text on demand

What i want to do I want some content (could be stored any where in a post or custom field) to load only when the user clicks for it to load. This content could be any thing (text,images,html etc) ...
0
votes
3answers
1k views

Ajax save data to database on document ready, no data being saved

I have written a plugin which collects stats on document ready. Keep in mind that my database table is already created. I've added the following code to do the ajax code add_action( 'wp_head', ...
1
vote
3answers
3k views

Frontend Ajax call not working using wp_ajax, wp_enqueue_script and wp_localize_script

I think i've almost got my head around this ajax is Wordpress business, thoroughly ejoying learning it but i'm now totally stumped. First up is the nasty bits! I have these in my main plugin file: ...
1
vote
2answers
1k views

Using Ajax call in jQuery doesn't work in widget

So I'm in the midst of creating a new conversion widget and I'm having some trouble getting the Ajax call to work in my widget. (works perfectly outside of WordPress). The problem at the moment is ...