Ready to get started?Download WordPress


Loop Problem When Excluding Category (2 posts)

  1. eatrains
    Posted 8 years ago #

    I'm trying to make a Loop that will display the five latest posts that don't belong to a certain category, let's call it Vacations. A post usually belongs to several categories, but if it also belongs to Vacations I don't want it displayed. However, all the examples I've tried from the Codex grab the five latest posts and then sort out that category. Since most posts do belong to Vacations, very few posts are displayed. Is there a way to sort out Vacations and than grab the five latest posts?

  2. MichaelH
    Posted 8 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic