Forums › Forums › Search & Filter Pro › Pagination wp-pagenavi not working in search results
Tagged: pagination
- This topic has 2 replies, 2 voices, and was last updated 9 years ago by Anonymous.
-
Anonymous(Private) November 9, 2015 at 9:29 pm #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(Private) November 10, 2015 at 11:42 am #29371Hi 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(Private) November 10, 2015 at 4:08 pm #29413My 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!
-
AuthorPosts