WordPress.org

Ready to get started?Download WordPress

Forums

WP-Paginate
Same items on every page (2 posts)

  1. freke1981
    Member
    Posted 1 year ago #

    I´ve got problem with the pagination when I should go to page 2, 3 and so on. The page/2/ is gone/removed from the url when the page reloads. So I can only see the first items all the time. When I check the url in the pagination at the bottom it shows up fine For example:

    http://kartago.se.preview.binero.se/forfattare/jan-stenmark/page/2/#content.

    This is the page with problem:

    http://kartago.se.preview.binero.se/forfattare/jan-stenmark/

    I use the plugin on the pages Böcker and Författare, and it is working fine.

    I also use the code:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $temp = $wp_query;
    $wp_query= null;
    
    .....
    
    if(function_exists('wp_paginate')){
    wp_paginate();
    }
    
    $wp_query = null; $wp_query = $temp;
    wp_reset_postdata();

    What should I do to keep the page/2 in the url on page reload?

    http://wordpress.org/extend/plugins/wp-paginate/

  2. freke1981
    Member
    Posted 1 year ago #

    Hmm, maybe I found a solution. By adding this into the functions.php file:

    remove_action('template_redirect','redirect_canonical');

    But I´m not sure what the above line does, and if it affects anything else? And why do I need it when the plugin is working on other pages that use paging?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic