WordPress.org

Ready to get started?Download WordPress

Forums

Having trouble setting up paged parameter for pagination for query_posts (1 post)

  1. Melting-Dog
    Member
    Posted 6 months ago #

    I have researched and researched how to do this and am following thie information here

    But my pagination just wont work. I just cant figure it out.

    My code looks like:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        $args=array(
            ‘paged’=>$paged, //Pulls the paged function into the query
            ‘posts_per_page’=>2, //Limits the amount of posts on each page
            );
        query_posts($args);
        while (have_posts()) : the_post(); ?>
            //BLOG POST STUFF
         <?php endwhile; wp_reset_query(); ?>
    <?php wp_pagenavi(); ?>

    Neither of the arguments work - no pagination and no limit to posts per page.

    Can anyone help me out at all?

    Many thanks

Reply

You must log in to post.

About this Topic