[wp-hackers] Querying posts of another WordPress install

Aaron Jorbin aaron at jorb.in
Mon Jul 26 11:56:17 UTC 2010


Is this using Multisite?  If so, you can use switch_to_blog -
http://codex.wordpress.org/WPMU_Functions/switch_to_blog and it's
counterpart restore_current_blog -
http://codex.wordpress.org/WPMU_Functions/restore_current_blog to move
around use the api.



http://aaron.jorb.in
twitter: twitter.com/aaronjorbin


On Mon, Jul 26, 2010 at 7:42 AM, Ashish Saini
<ashishsainiashfame at gmail.com>wrote:

> I think this can be done with the help of setup_postdata() by populating
> the
> fields as explained here -
> http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query
>
> Right? And is this the best approach?
>
> Thanks & Regards
> Ashish Saini aka Ashfame
> (Deserve Before You Desire)
> Homepage : http://www.ashfame.com | Blog : http://blog.ashfame.com |
> Twitter
> : http://twitter.com/ashfame
>
>
> On Mon, Jul 26, 2010 at 5:08 PM, Ashish Saini
> <ashishsainiashfame at gmail.com>wrote:
>
> > Hi,
> >
> > Is there any way that I can query posts from another WordPress install
> > residing in the same database? I know it can be done via SQL queries but
> is
> > there any workaround hacking my way along with API?
> >
> > Thanks & Regards
> > Ashish Saini aka Ashfame
> > (Deserve Before You Desire)
> > Homepage : http://www.ashfame.com | Blog : http://blog.ashfame.com |
> > Twitter : http://twitter.com/ashfame
> >
> _______________________________________________
> 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