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'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

2 Answers 2

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

See the offset argument:

...&offset=5...

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

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.