How to Exclude Latest Post from the WordPress Post Loop?

Wordpress post is generally news or informational updates about a certain topic or talking point. Posts are listed in reverse chronological order and can be tagged, categorized and even archived on your site. If you want to exclude the latest post from the WordPress Post Loop then you have to follow the steps given below.

Exclude Latest Post from the WordPress Post Loop

To exclude the latest post from the WordPress Post Loop you need to first 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');

The above query will display only 5 posts which follow the most recent post (1). The important part in this code is offset and this  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();
?>

If you face any problems or need our professional services, please email us at [email protected].

 

Join our Newsletter

Never miss the latest offers, voucher codes and useful articles delivered weekly in your inbox.