Hi,
why ignore my second WHERE function?
With this function I get all news but with all users.
Why grab and users where id is 1?
$news = new WP_Query('post_type=news&post_author!=1&orderby=ID&order=ASC');
Thanks ;)
Hi,
why ignore my second WHERE function?
With this function I get all news but with all users.
Why grab and users where id is 1?
$news = new WP_Query('post_type=news&post_author!=1&orderby=ID&order=ASC');
Thanks ;)
To exclude posts from an author with an id of 1 use:
$news = new WP_Query('post_type=news&post_author=-1&orderby=ID&order=ASC');Thanks for help,
but this no work...It's the same, i get with all authors.
Exclude Posts Belonging to an Author
Display all posts except those from an author by prefixing its id with a '-' (minus) sign:
$query = new WP_Query( 'author=-12,-34,-56' );
http://codex.wordpress.org/Function_Reference/WP_Query#Author_Parameters
whoops author !== post_author, good catch alchymyth
This topic has been closed to new replies.