Title: query_posts pagination with offset problem
Last modified: August 19, 2016

---

# query_posts pagination with offset problem

 *  [Annie Boccio](https://wordpress.org/support/users/banannie/)
 * (@banannie)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/query_posts-pagination-with-offset-problem/)
 * I’m trying to use query_posts om my front page to skip the most recent post (
   which appears in a feature box) but also include pagination.
 * This is the original code, which breaks pagination:
 *     ```
       <?php
       $limit = 4;
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts('showposts=' . $limit . '&paged=' . $paged .'&offset=1&cat=');
       $wp_query->is_archive = true; $wp_query->is_home = false;
       ?>
       ```
   
 * I’ve replaced that with this (found at [http://wordpress.org/support/topic/57912?replies=9](http://wordpress.org/support/topic/57912?replies=9))
   which fixes the pagination issue.
 *     ```
       <?php
       if (is_home()) {
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts("paged=$paged");
       }
       ?>
       ```
   
 * But now I’d like to add back in the offset=1 parameter
 *     ```
       <?php
       if (is_home()) {
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts("offset=1&paged=$paged");
       }
       ?>
       ```
   
 * and pagination breaks again. Is there another way to add in the offset?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/query_posts-pagination-with-offset-problem/#post-1090246)
 * Hi
 * Here’s the article on offsets and paging
    [http://weblogtoolscollection.com/archives/2008/06/19/how-to-offsets-and-paging/](http://weblogtoolscollection.com/archives/2008/06/19/how-to-offsets-and-paging/)
   See if you can work it out – ask questions if necessary
 *  Thread Starter [Annie Boccio](https://wordpress.org/support/users/banannie/)
 * (@banannie)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/query_posts-pagination-with-offset-problem/#post-1090367)
 * Thanks, that article was just what I needed, got it working!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘query_posts pagination with offset problem’ is closed to new replies.

## Tags

 * [offset](https://wordpress.org/support/topic-tag/offset/)
 * [pagination](https://wordpress.org/support/topic-tag/pagination/)
 * [query_posts](https://wordpress.org/support/topic-tag/query_posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Annie Boccio](https://wordpress.org/support/users/banannie/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/query_posts-pagination-with-offset-problem/#post-1090367)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
