Title: query_posts() show from post 2
Last modified: August 19, 2016

---

# query_posts() show from post 2

 *  Resolved [martindt](https://wordpress.org/support/users/martindt/)
 * (@martindt)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/query_posts-show-from-post-2/)
 * Hi
 * I’m trying to change my theme so the post showing will be difrent depending on
   what catogory post1 is.
 * What I want is that it shows post 1-10 if it’s post 1 is not catogory=1. If post
   1 is catogory=1 then show post 2-11
 * in pesudo code
 *     ```
       if post(1)!=cat(1)
            Then query_posts(1-10)
       else if post(1)=cat(1)
            Then query_posts(2-11)
       endif
       "The Loop"
       ```
   

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/query_posts-show-from-post-2/#post-1167250)
 * [http://codex.wordpress.org/Template_Tags/in_category](http://codex.wordpress.org/Template_Tags/in_category)
 *  Thread Starter [martindt](https://wordpress.org/support/users/martindt/)
 * (@martindt)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/query_posts-show-from-post-2/#post-1167344)
 * Thanks that is good for the catogory part.
    But I cant figure out how to show
   only post 2-11. showing 1-10 is esay only to add query_posts(posts_per_page=10)
   But how to make it show 2-11?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/query_posts-show-from-post-2/#post-1167348)
 * query_posts(‘showposts=10&offset=1’) ?
 *  Thread Starter [martindt](https://wordpress.org/support/users/martindt/)
 * (@martindt)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/query_posts-show-from-post-2/#post-1167496)
 * Thanks that is what I need 🙂

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

The topic ‘query_posts() show from post 2’ is closed to new replies.

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [martindt](https://wordpress.org/support/users/martindt/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/query_posts-show-from-post-2/#post-1167496)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
