[wp-hackers] Skip Main Query

Peter Westwood peter.westwood at ftwr.co.uk
Sat Jul 31 05:09:26 UTC 2010


On 31 Jul 2010, at 02:31, Michael Pretty <mpretty at voceconnect.com> wrote:

> If you don't need anything from the initial query, is there a reason you don't just take over earlier, like 'init'?  Most everything should be loaded at that point.
> 
> Michael Pretty
> prettyboymp
> 
> On 7/30/10 6:54 PM, Theodor Ramisch wrote:
>> Hi,
>> 
>> I'm writing a plugin which should display data from its own tables in XML. It does not rely on any posts.
>> 
>> To reach my plugin, I've added query_vars, the rewrite rules and listen on template_redirect for the parameters.
>> 
>> No I've noticed that WordPress still queries the posts from the start page. Is there a way to avoid that? Since I don't need the posts, I don't want to make that query.
>> 
>> Bypassing WP completely using mod_rewrite rules is not an option, since I need to have access to the database, permissions and so on.
>> 
>> 

There is a tick for a hook to allow For this as it would be nice fir buddypress too I'll have a look for it later today when I'm in trac

--
Peter Westwood
http://peter.westwood.name



More information about the wp-hackers mailing list