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

0
votes
1answer
136 views

Leverage permalinks with AJAX

I'm trying to implement some AJAX to my theme, but there are a few things I cannot get my head (or Google) around. I have a custom post type named "Faculty" and a page displaying the featured image ...
0
votes
0answers
17 views

Custom .php page that contains json for dynamically loaded content [duplicate]

Possible Duplicate: How can I use WordPress functions in my stylesheet? For my wordpress blog, I would like to use some JS to load dynamic content into the sidebar of my cached pages. I was ...
0
votes
1answer
1k views

AJAX post into pop-up div

I want to AJAX post content into a pop-up div when I click on the post / page link. I have come up with the following code: Relevant HTML / PHP: <ul class="links"> <?php if (have_posts()) : ...
11
votes
3answers
5k views

Adding admin-ajax.php to the frontend. Good or bad idea?

I love admin-ajax.php. But I hate having to localize in order to point frontend scripts to it, and I wish there was an equivalent, easy-to-find file for themes. (It also just bothers me to see ...
8
votes
2answers
4k views

How to get a unique nonce for each Ajax request?

I've seen a couple of discussions about getting Wordpress to regenerate a unique nonce for subsequent Ajax requests, but for the life of me I can't actually get Wordpress to do it-- every time I ...
5
votes
1answer
406 views

Including Wordpress in RESTful API

I'm using a great little open-source product called Restler to provide a RESTful API to a Wordpress application. In order for this to work I want to be able to load the Wordpress environment within a ...
0
votes
1answer
406 views

Best way to use ajax front-end?

The question is about which way is the best / easiest way to make a theme with ajax, using admin-ajax.php or normally. I ask because I see that complicates using admin-ajax.php for everything and use ...
1
vote
1answer
335 views

How to Create a Custom Panel and Fields in Post Page [Plugin]

I would like to write a custom plugin that adds a custom panel below the post compose panel that will have a few fields and a submit button. JS will kick-in to submit content to the database, without ...
1
vote
2answers
236 views

admin-ajax.php “ Missing argument 2” warning

I have the following code in functions.php <script type="text/javascript"> var post_id = "1055"; // hardcoded post id for testing purposes var type = "some_type"; var data = {action: ...
0
votes
1answer
555 views

Ajax object comes back empty

I'm writing a plugin with an ajax request and I'm getting a weird problem. It works fine the first few times but then all of a sudden, the data ends up empty or NULL. This is the code: /* in ...
2
votes
1answer
170 views

How to include admin-ajax when loading external javascript

I'm creating a plugin that has some external Javascript and some AJAX calls ... but I don't know the best way to make reference to the admin-ajax.php file since the path requires some input from PHP ...
0
votes
2answers
563 views

AJAX request not routing through proxy

I've built a plugin that uses AJAX to post a URL to the URL2PNG API and bring back a screenshot into WordPress via wp_remote_get. It works beautifully in my development environment. In production, ...
0
votes
1answer
1k views

problem using ajax url

I've got a js file like this: var category = []; var genre = []; var type = []; var mainContent = jQuery('#content'); var siteURL ="http://" + top.location.host.toString(); var URL = siteURL + ...
-1
votes
1answer
152 views

AJAX function needed (toggle text) [closed]

I am looking for a function that will toggle text exactly as shown by pressing the "Phone" button on this website. Any help would be much appreciated.
1
vote
2answers
850 views

WordPress Ajax Problems

Update I got it to fire using the following curl command: curl -H "Accept: application/json" -X POST http://localhost/wordpress/wp-admin/admin-ajax.php -d ...
1
vote
3answers
580 views

WP_Query orderby breaks when using AJAX?

I'm running in to a bit of a problem. I have a function called get_press(), it retrieves newest press items. It is inside of a plugin: class EWPress { function __construct() { ...
0
votes
1answer
153 views

where does my function output from load-* go?

I've got a function hooked into load-edit.php that prints out print content: add_action('load-edit.php', array($this, 'generate_bulk_print_content')); public function generate_bulk_print_content() { ...
3
votes
1answer
304 views

get data from wp-query, outside the loop & without url change

I am working on an advanced search on wordpress based on custom taxonomies. I've been stuck for 72h so I was hoping to have some help or thought... Step 1 --- in the js file the query strings are ...
1
vote
2answers
4k views

How to get gallery id inserted to a post?

Is it possible to get a specific Gallery ID inserted to a post in wordpress 3.5? I want to load gallery from post using Ajax. I use shortcode [gallery] to do it. But when I use it this way: echo ...
0
votes
2answers
157 views

Posting to loop.php file

I am trying to post to the loop.php template file and it is not going through for some reason, usually it should work but it isnt. Is there a alternative way to get this done? This is what I have in ...
0
votes
2answers
661 views

Change post query onclick

I'm trying to build kind of a filtering system for the events displayed on my website. I've made a custom post type 'Event', with a 'City' field. On my 'calendar' template page, I'm gathering all the ...
0
votes
1answer
132 views

My AJAX API plugin isn't working

I've created a tiny AJAX plugin to count hits on my articles and bypass caching but it just isn't working and not throwing up any errors. Can you see what I am doing wrong here? <?php ...
0
votes
3answers
1k views

I can't access wordpress functions from an ajax php call

I've seen a few questions similar to this but I can't find a solution to the issue I have. <?php add_action('wp_ajax_nopriv_LogHit_callback', 'LogHit_callback'); ...
0
votes
2answers
155 views

Ajax Plugin Not Echoing Response

I have created a plugin that will submit a form via ajax. Below is the php function. add_action('wp_ajax_nopriv_audience_intel', 'audience_intel_ajax'); add_action('wp_ajax_audience_intel', ...
5
votes
2answers
326 views

Allow only new sub-pages to be created

Here is an amazing solution to restrict the creation of new parent pages, and I would want to use it, but the newly created sub-pages are saved only as drafts and this was not solved (see last ...
0
votes
1answer
521 views

need a confirmation text to appear on email submission

With help of other relevant posts here, I have put together a code which allows the users to send me a list of selected posts via e-mail and it is working fine. Now, I would like a confirmation text ...
1
vote
1answer
3k views

Custom Login and Registration form in Ajax

How to create the custom login/Registration form using AJAX.
1
vote
0answers
852 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
2k 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 ...
4
votes
3answers
10k 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
606 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
337 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
542 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
594 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
241 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
752 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
120 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
625 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
809 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
467 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
543 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
226 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
308 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 – ...