Free Tutorials WordPress Tips

Exclude Latest Post From Home Page Loop

In this tutorial. i’ll provide the code i tested which excludes the latest published post from your home page loop.

Simply copy this PHP from the view raw link in the Gist and paste it at the end of your child themes functions.php file using a code editor.

The code above simply removes your most recent published post from the home page loop and can also be easily modified to offset any number of posts from the posts page you select in your Reading settings.

The home page loop may also be called your posts page or blog page.

When you publish a new post, it will be removed from the loop until you publish another post.

Similar Tutorials & Code Snippets

2 replies on “Exclude Latest Post From Home Page Loop”

Thanks Brad! I wish I had seen this post earlier!

This code for offsetting posts is quite similar to what I discovered as well. If you or your readers are interested in adding a bit of additional code, you can configured the site to maintain pagination as well.

Here is the additional code:

add_filter('found_posts', 'myprefix_adjust_offset_pagination', 1, 2 );
function myprefix_adjust_offset_pagination($found_posts, $query) {

    //Define our offset again...
    $offset = 1;

    if ( $query->is_posts_page ) {
        return $found_posts - $offset;
    return $found_posts;

For an extended explanation of this code visit this tutorial: “How to offset posts in the Genesis framework without losing pagination”.

Leave a Reply

Your email address will not be published. Required fields are marked *