Support » Fixing WordPress » Exclude specific category posts except for stickies

  • Have not been able to find this specific answer through extensive searching.

    In my main home page loop, I want to exclude a category of posts, except if a post in that category is a sticky!

    <?php query_posts($query_string . '&cat=-6'); ?>

    That will exclude all the posts in the category.

    So the logic would be:exclude if category=6 AND !sticky

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exclude specific category posts except for stickies’ is closed to new replies.