WordPress.org

Support

Support » How-To and Troubleshooting » Next_posts_link in Pages

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)
Viewing 1 replies (of 1 total)
  • The topic ‘Next_posts_link in Pages’ is closed to new replies.
Skip to toolbar