[wp-hackers] Can't exclude two authors in WP

Robert Lusby nanogwp at gmail.com
Fri Jan 13 21:40:52 UTC 2012


On 13/01/2012 20:13, BGWS-Development wrote:
> Hi Robert,
>
> Can you show us the query code?
>
> Thanks,
>
> Gary
>
> On Jan 13, 2012, at 2:24 PM, Robert Lusby wrote:
>
>> Trying to run a WP_query and exclude "two" authors, but grab everything else. Simply doesn't work.
>>
>> Found this trac ticket, but no progress in months - anyone know any further?
>>
>> http://core.trac.wordpress.org/ticket/16854
>>
>> Is there a "simple" non-SQL based workaround?
>>
>> Thanks,
>> Gavin
>>

Neither works:

$args = array('author=-2,-3,-4');
$newquery = WP_Query($args);

$args = array('author' => '-2,-3,-4');
$newquery = WP_Query($args);

R


More information about the wp-hackers mailing list