Forums › Forums › Search & Filter Pro › Pagination doesn't work
Tagged: archive filters, pagination
- This topic has 3 replies, 2 voices, and was last updated 9 years, 6 months ago by
Anonymous.
-
Anonymous(Private) August 4, 2015 at 2:00 pm #22597
Here is my website with filters
http://skillgen.eu/pl/sklep/
filters work pretty well, but there is a problem with pagination. When I use a filter, pagination doesn’t work. Try to check “Psychologia zarządzania” for example.
I created a file archive-filter.php, I put the pagination in there:<div class="pagination"> <?php global $wp_query; $big = 999999999; // need an unlikely integer echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages ) ); ?> </div>
In the settings I have Results per page: 15
Here are my other settings:
http://clivio.pl/skillgenpag.pngI searched forum but there is so much information about pagination that I could spend the whole day 🙂 I looked through a lot of it but I haven’t found solution to my problem.
Ross Moderator(Private) August 4, 2015 at 6:17 pm #22626Hey Katarzyna
I’m not sure what could be causing that, possibly another plugin interfering with the pagination process.
You could try using the wp-page-navi plugin instead as I’ve known that to work.
In S&F 2.0 I’ve rewritten how pagination works quite a bit so again, this may overcome your issues – I can send you the beta version to test if you like?
Thanks
Anonymous(Private) August 4, 2015 at 10:19 pm #22666I’ve managed to get pagination to work. In “Set a slug” option I added a slug “filter” and pagination started working.
But there is another problem – I want to display the number of retrieved items in the parenthesis next to the “Sklep” title. It works on my shop page, but when I enter the filter, it shows only 15 (number of items visible on the current page) – it doesn’t show all the items.
Maybe the plugin provides some function that counts retrieved items?
My function counting posts looks like this:function skg_get_posts_count() { global $wp_query; return $wp_query->post_count; }
-
AuthorPosts