WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Mandy
    Member
    Posted 4 years ago #

    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

  2. Monika
    Member
    Posted 4 years ago #

    this article is in German languages ;)
    but code is international

    http://www.texto.de/weiterblaettern-auf-der-statischen-seite-oder-sidebar-621/

  3. fredsnothere
    Member
    Posted 4 years ago #

    hey mafalda.

    how did u get the pagenavi plugin to work on the pageofposts page. i wasnt able to and the pagenavi support forum says its not supported.

Topic Closed

This topic has been closed to new replies.

About this Topic