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

1
vote
0answers
833 views

Dynamic dependent Dropdown lists for Categories, Sub-Categories and Posts!

I'm using WordPress 3.5 as CMS to develop my personal website. The reason I'm writting, is that I need a way to implement a code or plugin to allow users to navigate through posts using ...
0
votes
1answer
73 views

Something strange with ajax

function __construct(){ $ajax = add_action('wp_ajax_my_action', array($this, 'ajax_respone')); var_dump($ajax); var_dump($ajax == '1234'); die(); } public ...
1
vote
1answer
1k views

Ajax loading duplicate post

I wanna start by apologize for this post being so long, but I feel it may help others since I am having this problem and figured I might as well be as detailed as possible. I am having a problem with ...
3
votes
3answers
9k views

How does admin-ajax.php work?

we are having some issues with an external developer. i am not a wp person so i turn to the masses to help out. we want to limit access to the wp-admin site to internal access only (via vpn). simply ...
0
votes
1answer
584 views

Adding inside wp-plugin jQuery script that receives JSON-formatted data, generated by php-function inside this plugin

I'm trying to add Highstock chart in my plugin. It requires input data in json format. But I have some troubles with default json parser in jQuery. I've already read this article, but still can't ...
3
votes
1answer
326 views

Nonces can be reused multiple times? Bug / Security issue?

I've read that nonces are meant to be for one time use only, and after an ajax request, you should issue a new nonce so with the next ajax request, a new nonce would be sent to the server. However, I ...
0
votes
1answer
539 views

Sorting WP Auctions by date/price?

I'm using this plugin called WP Auctions with the List plugin, and as you may have guessed, it is to display a list of auctions on a page much like eBay where users can bid on items. It is simple to ...
0
votes
2answers
579 views

Allow AJAX call to other roles than admin

On my website, registered users (subscriber role) can send drafts and, if admins validate them, they are published. I'm trying to add a tag box to frontend editor used to send new posts. To implement ...
1
vote
1answer
238 views

Add/remove action on jQuery toggle

I have Ajax setup and I'm trying to toggle a function from being loaded into wp_head. It works on the first toggle function, but the second function doesn't register. function ...
0
votes
1answer
745 views

Ajax URLs without #!, how to prevent falling into single.php on load or reload?

I'm trying to make things properly with a single page ajax powered portfolio. I've read that there is no need of #! to make it crawlable by google. So I have clean URLs that updates with .pushState ...
0
votes
1answer
117 views

How to implement styling of div in the front end using plugin admin meta box settings?

I have a plugin meta box (in the Wordpress admin) with the following fields and values: Name of the div class selector= featured_content Font family= Verdana Font color= #000 They are stored in the ...
1
vote
0answers
608 views

Security - Ajax and Nonce use [closed]

I'm developing a site which posts a number of ajax calls from jquery to PHP and returns data from PhP to jquery. Everything is working, but i'd to know if my approach to handling the calls is ok, in ...
2
votes
4answers
1k views

Debug whats going on inside a function called from AJAX

I have a link on my post edit page (admin side) that calls up AJAX and jQuery to run a function inside my functions.php page. The link is wired up and calling the jQuery but I can't seem to debug ...
1
vote
1answer
1k views

Ajax and WP_Query/tax_query parameter

After doing some extensive research, I've exhausted all my options and decided to actually ask a question here. I'm trying to get a filtered set of posts through AJAX using WP_Query and the tax_query ...
0
votes
1answer
771 views

Why would admin-ajax.php redirect to the home page for logged out users?

I am using the wp-polls plugin on my website. This plugin relies on using AJAX requests of the form ...
1
vote
1answer
465 views

AJAX search as you type? [duplicate]

I'm trying to implement a kind of "search as you type" feature with the Search bar. Essentially, I'd like to have the user begin to type, make some kind of ajax request after each key, and then ...
0
votes
1answer
77 views

ajax page template

I am creating a wp theme that gets all its data via ajax (using ajax-admin.php). Now, I've set a div that would have the html of the page there (in the index.php file). My index.php is a simple one, ...
0
votes
2answers
531 views

how to refresh index page without reloading browser using ajax

the desire i want is similar on how facebook works; when a new content is being published, it pushes down the old post with the new posts on top. New Content (pushes down previous topics without ...
0
votes
1answer
219 views

Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?

I'm trying to implement AJAX into my post edit form in order to hook a custom wp function into a link click. So far I've been able to register my custom js file into my admin header. However when ...
1
vote
3answers
128 views

where do I send my ajax calls

Fighting to create an ajax request. I've been reading couple of articles but still I can't get my plugin to send and recive ajax datas. first init the js function ajax_load_scripts() { ...
0
votes
1answer
112 views

ajax sends data to plugin

I'm trying to send datas via jquery ajax to my plugins class to update a filed in a table and I'm getting the following error Fatal error: Call to a member function query() my class looks like ...
0
votes
1answer
2k views

Using wp_handle_upload and media_handle_sideload with ajax

I'm struggling to figure out how to use wp_handle_upload() with ajax when processing a form. What I'm doing here is using a form to allow users to edit posts from the front end so they can do some ...
2
votes
1answer
298 views

Buddypress ajax problem after adding new groups sub nav [closed]

This problem has been bugging me for couple of days. After adding a new subnav, I got the following error when trying to use the drop down groups filter: 404 Not Found – ...
0
votes
1answer
844 views

Pass data back to TinyMCE from Thickbox

I've added a shortcode button in the TinyMCE editor in the page/post pages that opens up a Thickbox form. The button is working; it opens up the thickbox form like it should. However my stumbling ...
1
vote
1answer
1k views

How to localize inline script called with ajax

I have a loop of posts and I allow a user to edit each post using ajax. When the edit button is clicked for the post I use ajax to retrieve the template part containing the edit form for the post. ...
0
votes
1answer
141 views

An adiitional function fires on my AJAX submit

I am working on a small community style website for my family to use. Mainly it is a small version of a social network so my nieces and nephews can have fun with each other. I have set up "freinding" ...
1
vote
1answer
3k views

ajax for filtering posts by category in wordpress loops

I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. So my question is if anyone can help me out to turn the following into a ...
1
vote
1answer
800 views

Update get_pages using ajax on form select change

I have the following code in my page template file, (below), which works ok when used with the normal form submit. What I'm trying to do is update the get_pages variables using ajax (no page ...
1
vote
1answer
77 views

Execute a function using ajax

I have a function called function getSingleAmazonProduct($asin=''). It returns an amazon product. I have a form field to enter the $asin. <div id="asinform"> <form ...
0
votes
1answer
531 views

AJAX function not working [closed]

One person on the site wrote a function, but I do not know why it works. This function displays a random quote. The functions implemented the ability to download new quotes via AJAX (link New Quote), ...
0
votes
2answers
599 views

How can I use AJAX with check-box categories?

How can I build a search filter (something like this) with WordPress? I have a custom post type name: "Locatii". It is a custom post type with categories. Ex: Cat 1 , Cat 2 ... and so on. How can ...
2
votes
1answer
10k views

How to add to cart via AJAX Woocommerce [closed]

I have been searching for a while, this. I want to add an item via AJAX. When you add an item to a cart in Woocommerce the page reloads with the GET parameter add-to-cart="The current product ID". I ...
4
votes
1answer
260 views

Saving (Updating) Post / Page Edits With AJAX

One of the major frustrations while editing posts/pages is that after saving, two things happen: The admin page is reloaded, which takes time More importantly, the cursor position is lost If ...
5
votes
2answers
878 views

Use AJAX in shortcode

I have the following code to the shortcode to display a random quote. Question: how to make a button display a new random quote? I mean, that would hit the button and show you a new quote (without ...
5
votes
1answer
731 views

External/non-WP rewrite rules

I have a fairly complex wordpress with multiple sub-directories: example.com/sub1/ example.com/sub2/ I'm trying to implement some history/bookmark support, and to do that I need the URLS containing ...
4
votes
2answers
719 views

the_title() and the_permalink() won't work on AJAX calls

I've run into a strange problem. I have a custom loop built with get_posts that works fine when loading the page normally: <?php $rows = get_posts(array( 'post_type' => ...
0
votes
1answer
595 views

Loading a post's content, into a div outside the loop, when it's title is selected in a list

I am building a site in wordpress where at a certain part there is a container that has a list of post items (see it as a menu/sidebar), and an empty space where I will load content. When you click on ...
0
votes
1answer
336 views

Call plugin with php function

This plugin only works as widget. I need call this plugin with php function. How to modify this code ? <?php /* Plugin Name: AJAX Calendar Plugin URI: ...
0
votes
2answers
831 views

How to get a value from PHP in Jquery through Ajax

I'm trying to get a value from a PHP function through Ajax and save it in a variable in jquery. The PHP; add_action( 'wp_ajax_mark_as_read', array( &$this, 'readen_color' ) ); public function ...
1
vote
1answer
397 views

Convert this relative path to absolute

In the .js script below, the ajaxPath reference breaks when the containing page is off the root directory of the site. Is there a workaround to make this path absolute? ...
0
votes
2answers
26k views

How do I Upload/Import Form (Input) Files via. Ajax function?

I keep running into an issue getting the file(s) added/switched to ajax so that the server ajax handler can deal with the rest. How can I get the $_FILES to be passed the same as with the default ...
2
votes
1answer
243 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 ...
6
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
788 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
110 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
72 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
508 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
500 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
496 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 ...