I’ve searched about for answers to this but can’t find anything that works.
How can I modify my query so that it exlucdes a particular category?
<?php $posts = get_posts('numberposts=15'); foreach ($posts as $post) : ?>
I can specify to show only one category, say
numberposts=15&category=1, but the reverse,
numberposts=15&category=-1gives me an error.
Thanks for your time
- The topic ‘get_posts – exclude one or more categories’ is closed to new replies.