WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
wp_pagenavi on *.php custom pages in root (1 post)

  1. mrwolf2727
    Member
    Posted 3 years ago #

    I have created a custom page called paywall.php and put in the root of WP. I use the get_header() and a couple of CSS tags to use my global template. I have the pagination displaying and counting the pages correctly, but when I click on page 2, it gives me the link paywall.php/paged/2/ which can't be interrupted. I am guessing that link needs to be displayed as paywall.php?paged=2 which works when I hard code the page number instead of using get_query_var('paged'). How do I fix?

    <?php query_posts('&posts_per_page=1' . '&paged='  .get_query_var('paged'));
    if (have_posts()) : while(have_posts()) : the_post();
    ?>
    <?php wp_pagenavi(); ?>
    post info
    <?php endwhile ; else : endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic