Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

Thanks!

share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.