WordPress.org

Ready to get started?Download WordPress

Forums

Pagination: Default is 3 pages, instead of unlimited. (1 post)

  1. RyanPrentiss
    Member
    Posted 3 years ago #

    Pagination is only giving me 3 pages, when I want unlimited... adding 0 as the 2nd parameter still only returns only 3 pages.

    $latestPage = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args = array('posts_per_page'=>6, 'paged'=>$latestPage);
    $latest = new WP_Query($args);
    next_posts_link('« Older Posts');
    previous_posts_link('Newer Posts »


    Any help would be appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags