The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Pagination is missing and styling of loading animation
- This topic has 21 replies, 3 voices, and was last updated 6 years, 5 months ago by Ross.
-
Marcel Westerhoff(Private) February 22, 2018 at 8:00 pm #161608This reply has been marked as private.Trevor Moderator(Private) February 23, 2018 at 9:24 am #161673This reply has been marked as private.Marcel Westerhoff(Private) March 9, 2018 at 8:07 pm #165161
Hi Ross, any news about this issue? Thanks for updating me.
Marcel Westerhoff(Private) March 15, 2018 at 5:52 pm #166259This reply has been marked as private.Ross Moderator(Private) March 23, 2018 at 3:19 pm #168026Hi Marcel
Just to update I’ve made some progress with this:
1) The styling of the pagination
It had been so long since working on this addon that I forgot a little about how VC grids work.
When VC has a grid and has pagination, this is not “proper” pagination. VC will get all the results (of all the pages of pagination) and then use javascript to show / hide your results.
This is fine for most cases where you don’t want much, but it makes the existing VC pagination unusable for our purposes (the way its coded, its simply not re-usable as-is, the pagination needs to be recreated). For this reason I implemented a hack/override to disable VC pagination, and allow for proper integration with WP pagination and the VC grid.
Of course this may not look the same as it did before, but I have added a filter which allows you to customise this pagination –
search_filter_vc_pagination
, example usage:add_filter( 'search_filter_vc_pagination', 'search_filter_vc_pagination' ); function search_filter_vc_pagination() { global $wp_query; $big = 999999999; // need an unlikely integer $translated = __( 'Page', 'mytextdomain' ); // Supply translatable string $output = 'Custom Pagination: '; $output .= 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, 'before_page_number' => '<span class="screen-reader-text">'.$translated.' </span>' ) ); return $output; }
This uses the WP function
paginate_links
, which should allow you to achieve pretty much anything you want.2) The initial load not showing pagination issue
This is something I’m still looking into, again its to do with the implementation of the above, and how we hide VC pagination and strap in WP pagination. Currently we add the WP pagination when the ajax request has completed and the results loaded, however it seems there is something not right here because we try to do this before the results are ready.
I’ll continue to look into this, but a quick question, where the results load, you have little loading/dots animation.. is there any way to disable this?
I think this may be causing the issue… You will notice in the grid settings, you have many different fade/load animation, and S&F supports these (you have this disabled anyway), but I think this one is coming from your theme.
Thanks
-
AuthorPosts
The forum ‘Search & Filter Pro’ is closed to new topics and replies.