[wp-hackers] ajax and posts
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:
Be sure to include the ajaxurl value in the user-facing page. The
wp_ajax_nopriv action works great for this.
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
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers