How to Exclude Latest Post from the WordPress Post Loop
Excluding latest posts from the loop and/or offset posts in the loop is one of the things that comes in handy when editing or designing themes. In this article we will show you how you can use the offset parameter in wp_query function to exclude latest posts from the WordPress post loop.
First you will need to find the loop that you are working with. Then you will need to add the following parameter:
query_posts('posts_per_page=5&offset=1');
This query is telling the loop to only display 5 posts which follow the most recent post (1). The important part in this code is “offset” and this magic word is doing the whole thing.
Your loop code should look like:
<?php
query_posts('posts_per_page=6&offset=1');
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
This should be it. If you have any questions feel free to ask via comments.
Source: WP Codex
Comments
4 Responses to “How to Exclude Latest Post from the WordPress Post Loop”Share Your Opinions
Tell us what you're thinking...
and if you want a pic to show with your comment, then get gravatar!
Please make sure that you have read our Comment Policy.










Thanks for this. Nice solution for magazine-style layouts.
Thanks, it was exactly what I was looking for! Thanks for any other hints.
Where exactly do you put this code to remove al posts but the sticky on the main page.
Thanks,
That is a multi-step process. First you would need to have a custom page template. Second you would need to create that custom page, your front page. Then you would run a query on that custom template showing only sticky posts.