WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been researching this, but there are so many choices I'm confused.

What I would like to do is display two loops on a static page that:

  1. the first loop displays all posts with the tag "featured"
  2. the first loop displays the thumbnail as well
  3. the second loop displays all other posts, excluding the ones already featured

There seems to be many options, some wrong, some seemingly too complicated.

Is there a best practice for doing this?


share|improve this question
up vote 2 down vote accepted
  1. Query first set of posts (probably with get_posts(), unless you feel up to using WP_Query directly).

  2. Loop through it, display, save their IDs in some variable.

  3. Loop through them again, display thumbnails.

  4. Query second set of posts, excluding IDs saved earlier via post__not_in.

  5. Loop through it and display.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.