-
AuthorSearch Results
-
September 15, 2017 at 10:49 pm #131400
Topic: Beaver Builder Posts Module AJAX integration
in forum Search & Filter Pro
AnonymousInactiveHeya,
I’m having trouble getting AJAX to work whilst using Beaver Builder’s Posts module.
Is there any documentation on this or anything specific I need to be doing?
Thanks in advance!
Brett
July 4, 2017 at 6:14 pm #118705In reply to: Pagination Wootemplate
RossKeymasterHey Fredrik
I found the solution.
It seems the issue we were working on (BB & S+F) didn’t quite make the release (well some of it didn’t I think).
I’m talking with the devs there and should know more about how to proceed and if they will be making this change.
For, if you must get it working immediately you can change the following in the Beaver Builder plugin:
File (around line 340):
bb-plugin/classes/class-fl-builder-loop.phpChange this:
echo paginate_links(array( 'base' => $base . '%_%', 'format' => $format, 'current' => $current_page, 'total' => $total_pages, 'type' => 'list' ));To:
$big = 999999999; // need an unlikely integer echo paginate_links(array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => $format, 'current' => $current_page, 'total' => $total_pages, 'type' => 'list' ));๐
Let me know how you get on.
Thanks
July 4, 2017 at 1:09 pm #118619In reply to: Pagination Wootemplate
RossKeymasterTested – no its not.
Definitely seems to be a compatibility issue with beaver builder. Will carry on and update this afternoon.
Best
June 28, 2017 at 4:09 pm #117362In reply to: Pagination not working properly
RossKeymasterHey Alex
Just to follow up on here.
I looks like we managed to resolve the Beaver Builder issues and they will be supplying the fixes in an upcoming release ๐
Let me know when you’ve had a chance to digest everything and update here to let me know everything is indeed working ok.
Thanks
June 22, 2017 at 4:40 pm #116386In reply to: Pagination Wootemplate
RossKeymasterAh yes I see the issue.
Your theme is technically doing pagination wrong.
This post explain exactly your issue:https://support.searchandfilter.com/forums/topic/pagination-not-working-properly/#post-108542 Oops wrong post…
The issue you are having (and I highlighted with the guys at beaver builder via email) is the way
baseis created in a pagination functionThis is the correct way:
$big = 999999999; // need an unlikely integer echo paginate_links(array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => $format, 'current' => $current_page, 'total' => $total_pages, 'type' => 'list' ));I assume your theme creates
basea different way – often not using the technique where a$bigvariable is created, as per the WP docs – https://codex.wordpress.org/Function_Reference/paginate_linksWhat we need to do is modify your themes pagination function, so that it correctly supports having query arguments in the URL – eg
?somefilter=valueBasically your themes pagination would not support any filtering system on this page.
Would you know how to do this? I would start with a child theme, and then overwrite the template where the pagination is located.
I can help with the code required if you can get to that step?
Best
May 12, 2017 at 4:37 pm #108542In reply to: Pagination not working properly
RossKeymasterHi Alex
Ok so I took a look, I see what you mean.
The issue usually is the way pagination works (and how it detects the current page).
S&F uses its own URL var (sf_paged) for pagination, so sometimes this causes issues like this.
I’m not familiar with beaver builder yet, but is there a way to customise pagination, using something like templates in your child theme? If you could figure that out, I know the code changes we would need to make ๐
—
To explain the issue & solution anyway (it might be useful to beaverbuilder):
Take page 6 of results here – https://yourdevsite/maths-videos/?sf_paged=6
Its clear on your site, the pagination thinks its still on page 1 while S&F has paginated the results to page 6. This is all to do with how your theme (and many others) gets the
current pagevariable from WordPress, which is then passed on to the pagination function.A lot themes pagination will look something like:
$current_page = max(1, get_query_var('paged')); echo paginate_links(array( 'base' => get_pagenum_link(1) . '%_%', 'format' => 'page/%#%', 'current' => $current_page, 'total' => $total_pages, ));Notice, current page is set from this var –
get_query_var('paged').To make pagination work correctly in all scenarios, even when the page has been changed dynamically (this could be changed by
pre_get_postsfor example), I personally think its best to get the paged var from the query itself, circumventing the need to know the pagination variable name in the URL or if its been altered dynamically.My solution is to set current page using
$wp_query->query_vars['paged']– so the code sample above would useglobal $wp_query; $current_page = max(1, $wp_query->query_vars['paged']); echo paginate_links(array( 'base' => get_pagenum_link(1) . '%_%', 'format' => 'page/%#%', 'current' => $current_page, 'total' => $total_pages, ));This I think is a more compatible approach to handling pagination in general and allows for more options as a developer (and in this case, would allow your theme pagination to work with S&F custom pagination query var).
Anyway, hope that makes sense, if not, figuring out how to customise beaver builder pagination will be all I need to advise next steps ๐
Best
April 20, 2017 at 9:53 am #103988
TrevorParticipantThe answer to the Masonry question is rather dependent on your theme (Tesseract, yes?). Are you using Beaver Builder to make the grid and does that use Masonry?
To make the filters go horizontal, you would need to use Custom CSS, like this maybe?
.searchandfilter > ul > li { display: inline-block; margin-right: 20px; float: left; } .searchandfilter > ul > li:last-child { margin-right: 0; } .search-filter-results {clear: both;}April 2, 2017 at 9:18 am #100948In reply to: Scrool effect unwanted
AnonymousInactiveOK, thanks a lot, I did send this last reply to the Beaver Builder guys. Hope they will be able to sort this out…… Keep this open and I will get back here as soon as it has been solved.
Kind Regards,
Peter
April 1, 2017 at 2:21 pm #100796In reply to: Scrool effect unwanted
AnonymousInactiveUnfortunatly, I cannot do that, since the whole concept of the site needs Beaver Builder pagebuilder, together with custom post types and custom fields.
January 11, 2017 at 8:03 pm #81458Topic: Manually add S&F to an existing query
in forum Search & Filter Pro
AnonymousInactiveHello,
I am trying to use S&F with Beaver Builder. I have a page using the Beaver Builder Posts module displaying a custom post type grid. I would like to add a dropdown at the top of the page to filter by and ACF field.
How can I add S&F to the query so the results show up on the same page.
Thanks for the help!
-
AuthorSearch Results
-
Search Results
-
Heya,
I’m having trouble getting AJAX to work whilst using Beaver Builder’s Posts module.
Is there any documentation on this or anything specific I need to be doing?
Thanks in advance!
Brett
Hello,
I am trying to use S&F with Beaver Builder. I have a page using the Beaver Builder Posts module displaying a custom post type grid. I would like to add a dropdown at the top of the page to filter by and ACF field.
How can I add S&F to the query so the results show up on the same page.
Thanks for the help!