[wp-hackers] exclude category from main loops via plugin
a.hoereth at gmail.com
Mon Dec 13 13:03:24 UTC 2010
I am working on a plugin which needs to exclude a post category from
main loops. E.g. the loop processed on the index page but as well from
Normally I would use
<?php query_posts($query_string . '&category_name=-mycategory'); ?>
directly in the theme files.
How do I add it using hooks?
loop_start, parse_query or pre_get_posts?
I already tried adding it, but it just killed the website..
More information about the wp-hackers