• Hey all!
    Hope all is ok.
    I have a news page that I am setting up.
    I currently have a query that shows posts only from a particular category. This is my code:

    <?php $recent = new WP_Query("cat=8&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>

    What I want to do now is set up another query that will show all posts EXCEPT for categories 8 and 9. How do I construct the query to show all posts except cat 8 and 9?

    Really hope someone can help.

    Regards,
    David

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Exluding posts from new WP_Query’ is closed to new replies.