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:


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:

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

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.