[wp-hackers] Exclude Categories From The Loop

Matt speedboxer at gmail.com
Sat Oct 6 05:21:20 GMT 2007


Thanks everyone for your replies!

On 10/5/07, Otto <otto at ottodestruct.com> wrote:
>
> Paul has the correct answer here, this is the cleanest way to do it.
> It will filter the categories in exactly the way you like. I would set
> the 'category__in' and 'category__not_in' query variables. They're new
> to 2.3, but they're very easy to use.
> $query->set('category__not_in','1,2,3,4') and such.
>
So category__not_in would be the excluded ones?


-- 
Matt (speedboxer at gmail.com)
http://mattsblog.ca/


More information about the wp-hackers mailing list