Forums › Forums › Search & Filter Pro › Using Beaver Themer to display results from more than one Post Type
Tagged: beaver themer
- This topic has 19 replies, 4 voices, and was last updated 6 years, 5 months ago by Ross.
-
Ross Moderator(Private) May 8, 2018 at 8:53 pm #176523
Hi Ollie
So I’ve made some progress.
I’m not entirely sure why some of the methods you tried with Trevor don’t work, but I’ve found some options.
First, can you clarify, what you mean by the Beaver Builder Grid? Even better, can you setup a grid, so I can see the exact issue you were having in the first place? (on staging of course)
Secondly, I went ahead and did a bunch of testing with Beaver Themer.
There you have the
post
module, which allows you to display results in various different ways… Although this works with Archive display mode (because its using the global query) there does appear to be some issues.I managed to get it almost working with the post module, and “column” view by adding this code to
functions.php
:add_filter("pre_get_posts", "modify_bb_query"); function modify_bb_query($query){ if(!isset($query->query_vars['fl_builder_loop'])){ return $query; } //if is page "find-stuff" and this is a <code>fl_builder_loop</code> if((is_page("find-stuff")) && ($query->query_vars['fl_builder_loop'] == true)){ //then attach S&F to the query $query->set('search_filter_id', 136); } }
You will need to change
find-stuff
the the slug of the page you are trying to filter on, and the136
to the ID of your search form.Then in S&F settings, for display method, use
custom
.Anyway, if thats a bit confusing, don’t try to replicate for now, just go ahead with recreating your issue as per my note near the top.
Thanks
Anonymous(Private) May 9, 2018 at 9:19 am #176618Hello Ross, great to hear back from you and this all sounds very promising. About me referring to the Beaver Grid… apologies, I meant the Beaver Post module, I’m currently using the Masonry layout and then making a custom post layout, you can see that in action now on the staging site.
That being said I’ve fallen at the first hurdle and the code you have developed produced an error straight away: Parse error: syntax error, unexpected ‘&’ in /home/redthre6/staging/3/wp-content/themes/bb-theme-child/functions.php on line 47
So I have commented it out for now. I’ve set up my staging site as I would like to use it. Using the form on the homepage will take you to the vehicle search results where I’ve set the Beaver Post module to Masonry with a custom post layout.
thanks
Anonymous(Private) June 2, 2018 at 4:16 pm #179629This thread seems to be exactly about something I’m also struggling with.
Any chance that the (non sensitive) info in the last couple of posts (May 9-11) can be shared publicly?
The answer may be here, but just hidden behind the “This reply has been marked as private.” wall.(I understand the need to shield some info, but a wealth of helpful information stays hidden from other users in the forums. Maybe you guys can find a way to improve that? Would benefit the community and may also lessen strain on support)
Ross Moderator(Private) June 5, 2018 at 9:36 pm #179792Hi Woon
We actually had some issues with implementing my code on the site (copy & paste errors).
We ended up using the code from this post:
https://support.searchandfilter.com/forums/topic/using-beaver-themer-to-display-results-from-more-than-one-post-type/page/2/#post-176523Let me know if that works for you.
Thanks
-
AuthorPosts