Hey Rai sorry for the delay.
If you take a look at the code from our results.php:
wp_pagenavi( array( 'query' => $query ) );
You see we are passing in the query, this is necessary so wp_pagenavi knows that it working with a specific query rather than the global $WP_Query.
I had a quick look at the plugin you were using wp_bootstrap_pagination
–
https://github.com/talentedaamer/Bootstrap-wordpress-pagination/blob/master/wp_bootstrap_pagination.php
I see it is possible to pass a custom_query
argument to it.. something like:
$args = (
'custom_query' => $query
);
wp_bootstrap_pagination($args);
I’m hoping this will work, however I’m not too familiar with that plugin, it might be best to ask them how to use their plugin with a custom query…
I do see one potential point of problem though, and that is this line (26):
$page = intval( get_query_var( 'paged' ) );
That plugin is setting the current page variable with get_query_var
which uses the global query, which in this case will cause errors.
EDIT: In fact I’ve just submitted an issue over there recommended the code change:
https://github.com/talentedaamer/Bootstrap-wordpress-pagination/issues/10
Hope that helps!