Title: Excluding first 4 posts
Last modified: August 19, 2016

---

# Excluding first 4 posts

 *  Resolved [markus](https://wordpress.org/support/users/rootym/)
 * (@rootym)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/)
 * Hello,
 * I have strange situation. I’m trying exclude first 4 post by using <?php query_posts(‘
   offset=4’); ?>
    It works, I see on the home page posts without first 4. But same
   posts from home page I see on page 2,3,4… etc
 * Probably, my code is broken. Maybe you can help?
 * There is my code:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com)]_
 * Thank you

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859567)
 *     ```
       <?php
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts('offset=4&paged=' . $paged); ?>
       ```
   
 *  Thread Starter [markus](https://wordpress.org/support/users/rootym/)
 * (@rootym)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859575)
 * Thank you, but same thing…
 * code – [http://wordpress.pastebin.com/rR5eePH0](http://wordpress.pastebin.com/rR5eePH0)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859643)
 * Try removing `<?php wp_reset_query(); ?>`.
 *  Thread Starter [markus](https://wordpress.org/support/users/rootym/)
 * (@rootym)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859710)
 * same problem.
 * This is so strange, so simple code and I don’t get were is the problem
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859711)
 * Does this template file contain more than 1 loop?
 *  Thread Starter [markus](https://wordpress.org/support/users/rootym/)
 * (@rootym)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859713)
 * I don’t now.
 * This is the code with your suggestions
 * [http://wordpress.pastebin.com/JB7v23Px](http://wordpress.pastebin.com/JB7v23Px)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859714)
 * That should work but try:
 *     ```
       <?php
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       $args= array(
       	'offset' => 4,
       	'paged' => $paged
       );
       query_posts($args);
       ?>
       ```
   
 *  Thread Starter [markus](https://wordpress.org/support/users/rootym/)
 * (@rootym)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859715)
 * not helped.
 * Your code works well for removing first 4 posts, but then I get a problem – same
   posts I see on all pages
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859716)
 * Then the problem is elsewhere – either in the theme or within your plugins.
 *  Thread Starter [markus](https://wordpress.org/support/users/rootym/)
 * (@rootym)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859719)
 * I tried this code on 2 blogs different blogs, even with default wordpress theme
   and with all plugins off
 *  Thread Starter [markus](https://wordpress.org/support/users/rootym/)
 * (@rootym)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859722)
 * without removing first posts everything working fine
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859732)
 * How many posts do you have?
 * Have you tried [resetting the plugins folder](http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F)
   by FTP or PhpMyAdmin? Sometimes, an apparently inactive plugin can still cause
   problems.

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

The topic ‘Excluding first 4 posts’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/excluding-first-4-posts/#post-1859732)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
