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 auto-...

learn more… | top users | synonyms

0
votes
2answers
946 views

How to Custom Edit Post Title & Permalink Slug?

I'm trying to build some functionality where if you're logged into an admin account you'll see a small 'edit' link next to each post title. clicking will use jquery to create 2 form inputs - 1 with ...
1
vote
2answers
2k views

How to put JQuery/Ajax inside shortcode?

The purpose of this plugin is to create a list that users can modify with up or down votes. The shortcode is supposed to display the list on a page and use JQuery to fadeIn and fadeOut while updating ...
0
votes
2answers
1k views

How to filter a static post page with ajax and $wp_query

I'm at a loss, I've found several unanswered questions related to this one. I have a static post page which has a search form in the sidebar. What I want to happen is to type in a keyword and then '...
7
votes
2answers
7k views

Enable Submit Comment Without Page Reload (Using Ajax)?

When user writes a comment and hits the submit button, WordPress reloads the page, before the comment is shown to the user. Is there an Ajax-based solution that allows users to submit questions ...
1
vote
1answer
135 views

making sense of admin-ajax

So I'm working with ThemeTrust's "reveal" theme, and there is an ajaxed in chunk-of-content that I'm really trying to change (grab custom meta fields (images) + insert into a slideshow). As far as I ...
0
votes
3answers
1k views

Specify ABSPATH in jQuery url

I'm building a custom jQuery form and I need to specify the siteurl in the url that loads /wp-admin/admin-ajax.php. I place this code in the template that has the form: <script type="text/...
5
votes
2answers
7k views

Why might a plugin's 'do_shortcode' not work in an AJAX request?

tl;dr: Contact Form 7's shortcode doesn't work in an AJAX request when called with do_shortcode functions.php add_action('wp_ajax_ps_get_survey_form', 'ps_get_survey_form'); add_action('...
0
votes
1answer
2k views

How to make wordpress URLS google friendly for ajax driven sites?

Our wordpress site utilizes the wordpress cms to serve up json data that we ingest via ajax requests and serve up with javascript. I would like to create URLs for my regular wordpress pages/posts that ...
1
vote
1answer
367 views

Plugin Settings not Saving on Ajax re-ordered table

This is an extension of Update Option Stored in Multi-Dimensional Array which was help getting draggable plugin options to save via ajax (which works), but unfortunately this is specific to the actual ...
13
votes
6answers
11k views

How to load wp_editor() through AJAX/jQuery

I have a theme that is custom developed and really complex. One of the things that I have is multiple content areas where users can specify content for specific tabs. I load multiple instances of ...
3
votes
0answers
736 views

I want to load post content by categories using Ajax

I have question. I would like to load post content, custom post, depends on category. So first of all I would like to have drop down menu which will list all my categories then once user will select ...
0
votes
1answer
3k views

what does $options = get_option('test_theme'); do?

I'm trying to set up theme options so they save with AJAX, I found this tutorial http://return-true.com/2010/01/using-ajax-in-your-wordpress-theme-admin/ it's calling $options = get_option('...
3
votes
1answer
1k views

How to add a sub menu with AJAX?

What i want to do is fire up the add_submenu_page() function from within ajax on my plugin options page. When i click an "Add League" link, i want to display an ajax input[text] that will save into ...
0
votes
2answers
467 views

Connect Agile Carousel to WordPress AJAX

Originally I hacked together Agile Carousel and WordPress by passing wp-load.php into the AJAX script but clearly that isn't the way to go. I've now read that wp-admin/admin-ajax.php is better, but I ...
0
votes
1answer
1k views

Ajax function not returning any results

Im trying to create an ajax call when I click a link, the link is the post thumbnail, and the result should show the post content. When I use admin-ajax.php it works fine, but the problem then is ...
0
votes
2answers
259 views

Wordpress Front-End Theme Editor

I would like to change my option panel to the front-end. So user can see whats happening with the site. Changes must be real-time. Searched allover but cant find a way to solve this.
12
votes
4answers
3k views

How to cache json with wp-super cache

In a new project we are using wp-super-cache (the client's preferred plugin) to create the static html files for custom content types. But we are trying to figure out if everything is being cached ...
6
votes
2answers
5k views

What is the simplest ajax upload plugin or script to be used with wordpress?

I'm trying to use image upload in my theme's options page and haven't found yet a simple ajax upload script with many tutorials or a good documentation, I just want a simple straightforward script so ...
2
votes
1answer
656 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
673 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
979 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
506 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
479 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
174 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
697 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
571 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, success:function(...
1
vote
1answer
627 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
366 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 type="text/javascript"&...
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 (isset($_REQUEST['...
0
votes
1answer
482 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
546 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
966 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
736 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
799 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> $(".view_post")....
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
412 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?