Hello,
I would like to know how to write a negative select query:
$myposts = get_posts('category=3&numberposts=5&offset=0');
I would actually like to select all posts BUT those who are in category 3. How can I do that?
Many thanks!
Hello,
I would like to know how to write a negative select query:
$myposts = get_posts('category=3&numberposts=5&offset=0');
I would actually like to select all posts BUT those who are in category 3. How can I do that?
Many thanks!
The section Exclude Posts from Some Category a little down the page should help.
Thank you! I think this is what I need!
Just one final question.
<?php if (in_category('3')) continue; ?>
If I wanted to exclude more than one category, can I write it as:
<?php if (in_category('3')) or (in_category('4')) continue; ?>
Thanks!
Zbyszek
You might want to try this instead.
This topic has been closed to new replies.