Support » Plugin: WP-PageNavi » [Plugin: WP-PageNavi] wp_pagenavi on *.php custom pages in root

  • 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; ?>
  • The topic ‘[Plugin: WP-PageNavi] wp_pagenavi on *.php custom pages in root’ is closed to new replies.