Title: Custom Post Loop with Offset Pagination
Last modified: August 21, 2016

---

# Custom Post Loop with Offset Pagination

 *  [badrobotbrain](https://wordpress.org/support/users/badrobotbrain/)
 * (@badrobotbrain)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/custom-post-loop-with-offset-pagination/)
 * I’ve created a page template to display blog posts (the standard “post” post 
   type) that displays the two most recent posts one way and the remaining posts
   another.
    I got it to halfway work, but the pagination is borked. Clicking the
   older/newer links returns the same posts that display on the first page. I’d 
   like the next page to display the remaining posts like the two-column posts.
 * Below is the code that I am using to render that part of the page.
    You can see
   the code live **[here »](http://wp.snitilycarrhosting.com/blog/)**
 *     ```
       <div class="span8">
       							<div class="left-column">
   
       							<!--BEGIN 1 COLUMN BLOG-->
       								<?php query_posts('post_type=post&posts_per_page=2'); ?>
       								<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
       								<div class="featured-blog-post">
       									<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
       									<?php if ( has_post_thumbnail()) the_post_thumbnail('blog-post-big-thumb', array('class' => 'thumbnail')); ?>
       									<div class="entry row-fluid">
       										<div class="post-author-image text-center span3">
       											<div class="author-avatar">
       												<?php echo get_avatar( get_the_author_meta( 'ID' ), 129); ?>
       											</div>
       											<p class="post-author small">by <?php the_author(); ?> </p>
       										</div>
       										<div class="post-excerpt span9">
       											<p class="entry-meta small"><span><?php the_time('F j, Y') ?> in <?php the_category(', ') ?></span></p>
       											<?php the_excerpt(); ?>
       										</div>
       									</div>
       								</div>
       								<?php endwhile; else: ?>
       								<?php endif; ?>
   
       								<!--BEGIN 2 COLUMN BLOG-->
       								<div class="blog-excerpts row">
       									<?php query_posts('post_type=post&posts_per_page=2&offset=2'); ?>
       									<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
       										<div class="span4 blog-snippet-span4" >
       											<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
       											<?php if ( has_post_thumbnail()) the_post_thumbnail('blog-post-small-thumb', array('class' => 'thumbnail')); ?>
       												<div class="entry">
       													<p class="entry-meta small">by <?php the_author_posts_link(); ?> <br><?php the_time('F j, Y') ?> in <?php the_category(', ') ?></p>
       													<?php the_excerpt(); ?>
       												</div>
       										</div>
       									<?php endwhile; else: ?>
       									<?php endif; ?>
       								</div>
       									<?php get_template_part('nav', 'below'); ?>
   
       							</div><!-- END LEFT COLUMN -->
       						</div> <!--END SPAN 8-->
       ```
   
 * I’m not entirely new to hacking together themes, but I’m still pretty raw when
   it comes to advanced theme options, funky queries, offsets and the such. I’m 
   trying to broaden my skill-set here so any advice you all can offer me is greatly
   appreciated.

The topic ‘Custom Post Loop with Offset Pagination’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [offset](https://wordpress.org/support/topic-tag/offset/)
 * [page template](https://wordpress.org/support/topic-tag/page-template/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [badrobotbrain](https://wordpress.org/support/users/badrobotbrain/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/custom-post-loop-with-offset-pagination/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
