Title: Next_posts_link in Pages
Last modified: August 19, 2016

---

# Next_posts_link in Pages

 *  [baia](https://wordpress.org/support/users/baia/)
 * (@baia)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/next_posts_link-in-pages/)
 * Hi everyone,
 * To list posts in a Page with navigation buttons I use the following code :
 *     ```
       $ppp = 10;
       if ($paged>0) $page = $paged - 1; else $page = $paged;
       $theoffset = $ppp * $page;
       query_posts('posts_per_page='.$ppp.'&post_type=post&offset='.$theoffset);
   
       if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
       ```
   
 * It works fine but it’s not very attractive. Is there a simpler way to do it ?

Viewing 1 replies (of 1 total)

 *  Thread Starter [baia](https://wordpress.org/support/users/baia/)
 * (@baia)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/next_posts_link-in-pages/#post-1708638)
 * Anyone .. ?

Viewing 1 replies (of 1 total)

The topic ‘Next_posts_link in Pages’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [baia](https://wordpress.org/support/users/baia/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/next_posts_link-in-pages/#post-1708638)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
