[wp-hackers] ajax to call function in theme

Dylan Kuhn dylankkuhn at gmail.com
Thu Dec 24 19:08:52 UTC 2009

> That said, you can always use the init or the template_redirect action
> to do AJAX requests to the main blog URL instead of going through the
> explicit admin-ajax code.

Largely inspired by Otto's suggestions, I attempted to make an AJAX
interface that would work on the front end using template_redirect. In
my testing with WP 2.8.6, I found that POST requests done this way
would get a 301 response, which would redirect to a GET on the same
URL (of course now without the POST data). Anyone know of core code
that might do that?


More information about the wp-hackers mailing list