WordPress.org

Support

Support » Plugins and Hacks » [Resolved] PageofPosts Pagination issue (same posts on every page)

[Resolved] PageofPosts Pagination issue (same posts on every page)

  • Hola!
    I am using the PageOfPosts Template (http://codex.wordpress.org/Pages#A_Page_of_Posts) and have a problem with the pagination:
    I can see the pages below – using the wp_pagenavi plugin.

    <div class="navigation">
        <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    	else { ?>
    	<div class="right"><?php next_posts_link('Next Page &raquo;') ?></div>
    	<div class="left"><?php previous_posts_link('&laquo; Previous Page') ?></div>
        <?php } ?>
    </div>

    I can see the navigation and it shows 5 posts per page like I want to have it. But if I go to page 2 for example, I don’t see the next 5 posts – on all pages it displays the same posts: always the latest 5 posts from this category.

    I added this code before the line <?php if( $my_query->have_posts() ) : ?>:

    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("category_name=Blog&showposts=5&paged=$page"); ?>

    Any idea what could be the problem?
    Thanks for any help!!

    Mandy

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] PageofPosts Pagination issue (same posts on every page)’ is closed to new replies.