[wp-hackers] Avoiding the main query when loading WP from another script

Otto otto at ottodestruct.com
Sun Dec 9 12:26:12 UTC 2012


Err... Just include wp-load.php?

The query doesn't run until the wp() function is called, and that
happens in wp-blog-header.php, not in wp-load.php. So, just including
wp-load.php doesn't run the main query. Or parse the query vars, or
much of anything else.

-Otto


On Sun, Dec 9, 2012 at 6:01 AM, Ryan McCue <lists at rotorised.com> wrote:
> Hey hackers,
>
> I just posted a question on the WP Answers Stack Exchange, and figured
> that it's probably worth asking here too:
>
> http://wordpress.stackexchange.com/questions/75462/how-do-i-avoid-running-the-main-query-when-loading-wp-from-another-script
>
> Surely I'm not the first person to come up against this, so I'd love to
> hear how you've solved this in your own applications.
>
> Thanks,
> --
> Ryan McCue
> <http://ryanmccue.info/>
> _______________________________________________
> 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