[wp-hackers] ajax and posts

William Satterwhite whsatterwhite at gmail.com
Mon May 21 12:19:21 UTC 2012


There are specific hooks built-in to WordPress for handling ajax requests
whether you're on the front or backside of things. Check out the following
links for some information in to them. The WPSE link may put you on the
right path as it seems to be a working example close to what you're trying
to do.

http://codex.wordpress.org/AJAX
http://wordpress.stackexchange.com/questions/31321/post-will-not-load-via-ajax

On Mon, May 21, 2012 at 8:06 AM, Roman Sharf <pencilking2002 at gmail.com>wrote:

> I have been trying to figure this one out for a while, but to no avail.
>
> How can I I retrieve posts via ajax? Specifically, I would like to click a
> button on a page, which would send an ajax request to another page which
> has a custom loop and get the results back and spit them out. Also, do I
> have to load the wordpress environment manually on the page I am requesting
> from(So that the loop will work)?
>
> Thank you in advance!
>
> --
> "Only put off until tomorrow what you are willing to die having left
> undone." -Pablo Picasso
> www.romansharf.com
> www.romansharf.com/sketchnow
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Hunter Satterwhite
http://linkedin.com/in/hsatterwhite
(252) 762-5177


More information about the wp-hackers mailing list