WordPress.org

Ready to get started?Download WordPress

Forums

Next_posts_link in Pages (2 posts)

  1. baia
    Member
    Posted 3 years ago #

    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 ?

  2. baia
    Member
    Posted 3 years ago #

    Anyone .. ?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.