Title: Pagination Continuous
Last modified: August 21, 2016

---

# Pagination Continuous

 *  Resolved [yanks789](https://wordpress.org/support/users/yanks789/)
 * (@yanks789)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/pagination-continuous/)
 * I know Pagination is used more for next/previous or older/newer but is it possible
   when at the newest post the options are to go to newest AND oldest, thus starting
   all over. Sam thing for the oldest post, the user clicking next would go to the
   next oldest post or the user would click previous taking them to the newest post.
 * I’m looking to create an infinite circle effect because date does not really 
   matter for my project, more the next/previous aspect.
 * Any help is greatly appreciated.

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

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/pagination-continuous/#post-4101047)
 * What functions does your theme use to show the pagination?
    [http://codex.wordpress.org/Pagination#Function_Reference](http://codex.wordpress.org/Pagination#Function_Reference)
 *  Thread Starter [yanks789](https://wordpress.org/support/users/yanks789/)
 * (@yanks789)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/pagination-continuous/#post-4101118)
 * My site is using
 *     ```
       <div id="page-navigation">
   
       <center><?php if(function_exists('wp_pagenavi')) : wp_pagenavi(); ?>
   
       <?php else : posts_nav_link(' ', __('Next', 'Vesta'), __('Previous', 'Vesta')); echo '<div class="clear"></div>'; endif;?></center>
   
       </div>
       ```
   
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/pagination-continuous/#post-4101191)
 * Try it with this:
 *     ```
       <div id="page-navigation">
       <center>
       <?php
       if ( function_exists( 'wp_pagenavi' ) ) {
   
       	wp_pagenavi();
   
       } else {
   
       	global $wp_query;
   
       	$next_label = __( 'Previous', 'Vesta' );
       	$prev_label =  __( 'Next', 'Vesta' );
       	$seperator = ' ';
   
       	$next = get_next_posts_link( $next_label );
       	$previous = get_previous_posts_link( $prev_label );
       	$html = '';
   
       	if ( $next ) {
       		$html .= $next;
       	} else {
       		$html .= '<a href="' . get_pagenum_link( 1 ) . '" >' . $next_label .'</a>';
       	}
   
       	$html .= $seperator;
   
       	if ( $previous ) {
       		$html .=  $previous;
       	} else {
       		$html .=  '<a href="' . get_pagenum_link( $wp_query->max_num_pages ) . '" >'. $prev_label .'</a>';
       	}
   
       	echo $html . '<div class="clear"></div>';
       }
       ?>
       </center>
       </div>
       ```
   
 *  Thread Starter [yanks789](https://wordpress.org/support/users/yanks789/)
 * (@yanks789)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/pagination-continuous/#post-4101201)
 * Perfect!!! Exactly what I was looking for. Thank you so much for your help!

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

The topic ‘Pagination Continuous’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [yanks789](https://wordpress.org/support/users/yanks789/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/pagination-continuous/#post-4101201)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
