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'd like to edit the front page posts query to be slightly more advanced. Right now it excludes all posts in the Featured category. I'd like it to exclude the first 5 posts (or first n posts, really), but include the rest in the results.

Here is the current call:

<?php query_posts("cat=-".$GLOBALS['ex_feat'].",-".$GLOBALS['ex_vid'].",-".$GLOBALS['ex_aside']."&paged=$paged"); ?>

How would I edit this to include all featured posts as well, except the first 5?

share|improve this question

See the offset argument:


And avoid using global variables, and query_posts. Use the pre_get_posts action instead.

share|improve this answer
Can I set the offset of featured posts to 5, but leave everything else at 0? – hookedonwinter Dec 22 '11 at 2:57
up vote 0 down vote accepted

I ended up asking this in a better way, and received an answer:

Add a special filter link to All Posts in admin

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.