0

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?

0

See the offset argument:

...&offset=5...

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

  • Can I set the offset of featured posts to 5, but leave everything else at 0? – hookedonwinter Dec 22 '11 at 2:57
0

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

Add a special filter link to All Posts in admin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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