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

Conditional Ajax inclusion

I have a custom interface that uses 30+ ajax files while running... some files are only used in category.php while othere's are only used in page.php... i include the ajax loader php files in my ...
5
votes
1answer
2k views

How to check if I am in admin_ajax?

Right now for my plugin, I am using in_admin() to determine if the user is in the frontend of the site or in the admin area. However, the problem occurs when plugins use admin_ajax.php to process ajax ...
2
votes
1answer
6k views

Load tinyMCE / wp_editor() via AJAX [duplicate]

Possible Duplicate: How to load wp_editor() through AJAX/jQuery There are several questions about this (like this, or that), but none of them provides a solution to me. The situation: I ...
1
vote
1answer
771 views

Ajax response is always 0

I am trying to figure out why my Ajax response is always 0. I am trying to load in meta data into a Jquery UI Dialog box based on the ID of the link clicked. All of this is in a single.php template ...
2
votes
1answer
102 views

Redirect users away from Admin breaks ajax

Tried to make a simple redirect for some users I don't want to access the wp-admin/, so I did this code: function no_admin_access() { if ( !current_user_can( 'delete_posts' ) ) { ...
1
vote
1answer
71 views

Ajaxify calendar

I need ajaxify "next" and "prev" links in wordpress calendar for navigation of months, without updating the page. There is some plugins for this - but I call calendar without using widgets - ...
0
votes
1answer
487 views

How to use wp_update_post with ajax on frontend

I've been working hard trying to implement a frontend post editor "sidebar" on each post when I'm logged in. You can see what is going on here with a test post: ...
0
votes
1answer
460 views

Using email_exists() wp function in an ajax request

I'm requesting the wordpress function if (email_exists($email)) { ... } from a file (email_check.php) via ajax. Using this function is causing a server error though. The origin (from an input text ...
1
vote
1answer
446 views

slideshow is not showing in a post call with ajax

this is the code I use to call ajax posts in the same page. It's works fine but when the post is load the slideshow in the post (add via short code) is not showing.... the ajax call ...
0
votes
1answer
256 views

How to implement a plugin featuring foursquare like check-in

I need to add a check-in feature (very similar to foursquare check-in) in worpress based site. There will be "Check in" button at the top of the web site, and clicking on it the visitor will be ...
0
votes
1answer
133 views

Adding a time stamp on post view

Hi there we are using this ajax function to update the views of our custom "posts" if( !empty( $_REQUEST['action']) && $_REQUEST['action'] == 'update_view_count' && ...
1
vote
1answer
548 views

Embedded Twitter feed won't render nicely when loaded via Ajax

If you paste a Tweet URL to your post, Wordpress will nicely render it. But if I load posts via Ajax, the URL gets replaced by a Blockquote, but not with the nicely rendered one. The class of the ...
1
vote
2answers
1k views

Check if username exist with AJAX

I've created a custom registration form for a WordPress MultiSite installation. It allows registrations of new blogs and users. I want to check with ajax if a given username is available. This is what ...
0
votes
1answer
2k views

WP_Query class not found

The idea is simple. I have a drop-down menu generated with get_categories(). This outputs a list of categories in an unordered list, each in it's own li element. I'm getting the text values of those ...
0
votes
1answer
285 views

How to keep track of when a vote is cast?

I have setup a great voting system on my website, but since I want to sort the top rated posts by week, month and alltime...I now need to able able to keep track of when a vote has been cast. Could ...
2
votes
2answers
840 views

The correct way to call posts with ajax

I'm trying to write an image gallery plugin with jQuery. I'm using jQuerys $.post AJAX method to send and receive info from the relevant post page. Basically I'll be looping through the attachments ...
0
votes
1answer
1k views

Duplicate posts showing up in loop using infinite scroll

I'm experiencing an odd issue using Infinite Scroll for the WP_Query loop on my homepage. Half the time when the second page fires, I'm getting a few duplicate posts showing up in the second set. I ...
0
votes
1answer
1k views

What is the best way to implement ajax based pagination on custom query based templates?

We can use multiple plugins like wp-pagenavi or wp-paginate for implementing pagination for wordpress sites and making it ajax based using the following code: jQuery(document).ready(function(){ ...
1
vote
1answer
505 views

Load WP content with ajax less server demanding and faster than normal page loading?

This is a technical doubt I had after reading some articles about WP ajax process (cannot find them though). Is it faster and cheaper to load WP content (any content, page, post, widgets etc...) ...
2
votes
1answer
97 views

How to get full content including template HTML

I'm looking to get the page content between the header and footer (as Wordpress already does) that includes the template HTML (as this is going to be an AJAX request). Is there a function that will ...
4
votes
1answer
196 views

Prevent reload confirmation after AJAX save

I am saving information in the admin panel via ajax. The problem I'm running in to is the "Are you sure you want to navigate away from this page" popup appear, even though everything has been saved. ...
0
votes
1answer
175 views

Ajax call does not work for this custom code

I have this ajax call which gets the value for catname: jQuery('.bio a').click( function(){ var catname = $(this).closest(".bio").data('category'); alert(catname); jQuery.ajax({ ...
0
votes
1answer
929 views

using Ajax: call to undefined function get_option

I am using ajax on my template to load a file called counter.php. When I click a button, it is supposed to increase the counter. But when I click the button I get this error "Fatal error: Call to ...
0
votes
3answers
1k views

Force redirect single.php to index

I want to make a force redirect for single.php to index so that it is never reachable by direct access (the site is built in a way that you retrieve all the content on the index page, still need to ...
0
votes
2answers
190 views

Syntax for a function in order to get post's title in JSON encoded response [closed]

I use the following code in functions.php in order to obtain all the images attached to a post so I can retrieve them via AJAX. <?php function get_all_images($post_id=0, $size='bigger', ...
1
vote
1answer
918 views

Error when posting comment form: The error is TypeError: e[h] is not a function

I am getting an error when the function below posts the form (from the second time, the first time it is blocked). When I click the submit button after this, the form submits without problem. The ...
1
vote
1answer
1k views

How to check username availability with ajax at registration

I'm using buddypress which uses its own template form register.php for registration at http://mysite.com/register. I'm looking for a way to show the user whether or not their entered username is ...
1
vote
2answers
690 views

Load comments per post on click with AJAX

I'm working on a theme that uses a slider to display blog posts. Beneath the slider is a pagination that displays like a timeline, with a date instead of a page number, calling the corresponding blog ...
-1
votes
1answer
564 views

How to combine jQuery in-place editor with $wpdb->update

i am trying to use jQuery in-place editor (http://code.google.com/p/jquery-in-place-editor/) on WordPress to update certain values of a custom made table in my database. I am not really skilled with ...
1
vote
0answers
163 views

Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX

I need to be able to do the following: List all terms in a custom taxonomy (categories for custom post type) When a user clicks on a category, a listing of all posts in that category appears When a ...
2
votes
1answer
286 views

wp_ajax_[service] returning 0

I have a few Ajax services that I'm setting up. All of them require being logged in so I've attached hooks into the "wp_ajax_[$service]". The problem is when I call these services I just get a "0" ...
1
vote
2answers
2k views

wp_verify_nonce not working

I'm working on an ajax request, I have several ajax requests on my functions.php. And all are working, but this: On my php I have this: add_action("wp_ajax_fb_points", "get_fb_points"); ...
0
votes
1answer
61 views

Load featured article once in a loop

I'm working on a WP-Touch theme and I have a template file that looks like this: <?php get_header(); ?> <?php locate_template( 'featured-post.php', true, false ); ?> <?php ...
0
votes
1answer
3k views

call shortcode in javascript

I want to display a shortcode through jquery after the DOM is loaded: This is how I call the shortcode: <?php echo do_shortcode('[plugin]'); ?> Now, my question is how can I call that ...
3
votes
1answer
710 views

store/cache ajax sent data to avoid repeated request

I developed a widget that offer a full blown archive search tool, where the user can select various options that are joined into an objects to be passed to WP_Query in an ajax action that returns the ...
2
votes
1answer
4k views

Load posts dynamically

I am looking for a solution/guidance on how I might have links of posts listed in a hierarchical manner in a left column of a template and when a link is chosen it loads a post in the right column but ...
1
vote
1answer
925 views

Intergrating agile carousel to wordpress: how to write the ajax_callback function

json is totally new to me how to write an ajax_callback function for agile carousel to work in wordpress? Below is the jason data format that I need to write as php arrays for it could be parsed by ...
0
votes
1answer
203 views

Using jQuery .after inside loop

I have a bit of javascript that will dynamically add a static post to a loop. The script uses the jQuery 'after' method and on a static page it works beautifully but when inside the loop I don't get ...
0
votes
2answers
214 views

AJAX requests within templates

I'm trying to come to an accurate decision here about safe ajax requests from a template. The thing about AJAX that always scares me is that the called script location is public: ...
5
votes
1answer
2k views

AJAX search on post pages by custom post type

I'm having an issue creating an ajax search on my single post pages. I need to limit the search results to the custom post types "fod_videos" and "post" and category 12. My issue is the search is ...
-2
votes
1answer
476 views

How can I json_encode the output of my function?

How can I json_encode the output of this function I use to get all attached images of a post? <?php function get_all_images($postid=0, $size='bigger', $attributes='') { if ($postid<1) ...
1
vote
1answer
373 views

Exposing data using a custom Wordpress API

I'm attempting to create an API through Wordpress exposing some of my back-end data. I've come to the conclusion that I cannot have a stand alone page (plugin) exposing this data because Wordpress is ...
1
vote
0answers
635 views

Save & Reset button in theme-option with Ajax (without refresh)

I have a theme-options page and i will that the save and reset button loaded without refresh the whole page... but i have no idea, how i can implement ajax in my theme-option... Thank you for your ...
0
votes
1answer
988 views

Use ajax request to load sidebar

For a project, i've to improve SEO perf and one of this optimization is to load the sidebar with an ajax request. I've looking for this solution through the documentation, source code, plugins ...
0
votes
1answer
1k views

Trying to load content of a post via AJAX

OK I'm trying to load content of a post via AJAX. So here is the functions.php part wp_localize_script('ajax-script', 'ajax_object', array('url' => $blogurl,'path' => $path,'ajaxurl' => ...
2
votes
1answer
649 views

Edit post meta with checkboxes on front end

I'm trying to build an interface so that two custom fields for a custom post type can be edited on the front end with checkboxes. I'd like to display empty checkboxes if neither of those the fields ...
0
votes
1answer
2k views

Using AJAX to run SQL statement and populate dropdown

I am trying to create a search where the user selects two different bits of data from the database and it then prints some results that meet requirements. I know I need to use AJAX, or something ...
2
votes
0answers
972 views

“Uncaught SyntaxError: Unexpected token <” in load-scripts.php [closed]

Out of curiosity, I'm implementing AJAX in saving post. I didn't know where to start until I found this Q&A. It looks something I can grab and build on. It works but something on the Wordpress ...
0
votes
1answer
1k views

Is there an easy way to AJAX-ify saving of post?

We have a plugin that allows us to manage custom post types and we'd like to add AJAX functionality in saving, editing, and deleting posts. I couldn't find similar problems in the internet so I'm ...
0
votes
1answer
2k views

How do you use do_shortcode via AJAX call?

I'm attempting to call a Contact Form 7 form using AJAX in a Wordpress theme. I'd ideally like to use the Contact Form 7 shortcode to do this, however it doesn't seem as though do_shortcode is an ...