Pagination wp-pagenavi not working in search results

Forums › Forums › Search & Filter Pro › Pagination wp-pagenavi not working in search results

Tagged: 

Viewing 3 posts – 1 through 3 (of 3 total)
  • Anonymous
    #29325

    Hi Ross,
    First of all excellent plugin!

    I have an issue with the pagination in my website.
    http://consultoracip.com/buscador
    The pagination is stuck in the first page.

    The wp pagenavi was not working in the listing pages so I have to modify the query args
    http://consultoracip.com/ventas/
    And I added this code to fix it
    'paged' => get_query_var('paged'),

    I’m also working in a re-design over here
    http://refresh.consultoracip.com/buscador/
    and the pagination is working.

    I already tried the same settings, I disable a few plugins but is not working.

    Any suggestions?
    Thanks!

    Ross Moderator
    #29371

    Hi Martin

    Did you check the included results.php for the correct way to use wp-pagenavi plugin?

    This can be found in:

    wp-content/plugins/search-filter-pro/templates/

    S&F does not use the paged variable generally, and because the shortcode runs its own query, it must be passed into the pagenavi function:

    wp_pagenavi( array( 'query' => $query ) );

    Thanks

    Anonymous
    #29413

    My bad I was re writing the pagination_base to translate them into spanish and it was causing the pagination not to work correctly.

    
    function re_rewrite_rules() {
        global $wp_rewrite;
        $wp_rewrite->author_base        = 'autor';
        $wp_rewrite->search_base        = 'buscar';
        $wp_rewrite->comments_base      = 'comentarios';
        $wp_rewrite->pagination_base    = 'pagina';
        $wp_rewrite->flush_rules();
    }
    add_action('init', 're_rewrite_rules');
    

    Thanks for you help!

Viewing 3 posts – 1 through 3 (of 3 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.