Plugins disabled when using wp-blog-header.php for site integration?
-
I’m trying to pull the most recent posts from my blog into a different part of my site. That works fine. But it appears that none of the plugins that should be filtering the posts are running.
Here’s the code I’m using to pull the posts:
require_once( 'path-to-wp/wp-blog-header.php' ); query_posts('showposts=3'); require_once( get_home_template() );
(The problem persists even when I replace that last line with a custom loop, but for now I’m just using the normal template for troubleshooting.)
If I precede that code with
define('WP_USE_THEMES', true);
, then the problem goes away–all the plugins run as expected. But then, I also lose the ability to create a custom loop.Is there some constant I need to set or function I need to call to get the plugins to run? They’re running on standard hooks (mostly “the_content”), so I can’t fathom why they don’t run here.
- The topic ‘Plugins disabled when using wp-blog-header.php for site integration?’ is closed to new replies.