[wp-hackers] ajax and posts
Matthew McGarity
matthew at mcgarity.me
Wed May 23 18:11:06 UTC 2012
I do this all of the time using the following example as a launching point:
http://codex.wordpress.org/AJAX_in_Plugins
Be sure to include the ajaxurl value in the user-facing page. The
wp_ajax_nopriv action works great for this.
MMc...
Matthew McGarity
http://mcgarity.me
(972) 275-9673
On Mon, May 21, 2012 at 7: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
>
More information about the wp-hackers
mailing list