AnonymousInactive
Salient does use VC – now called WPBakery Page Builder. Not a tool I’m used to using. I’m not a fan…
I am using the shortcode method now. If I set to “show results” I end up with an unstyled post listing – something I could fix, but budget is short on this one, and this client is used to / comfortable with working with Salient.
Your point on masonry not loading in ajax views totally makes sense. I should have thought of that! I’ll look over that solution and see if it will work. Worst case scenario, I’ll add a js function that looks at the referring url, and if it sees the search pattern, scroll the reloaded page down to the filter form. I just wanted to make sure there wasn’t a better method that I didn’t know about.
Does Salient include Visual Composer?
Alternatively, the issue that you face is that Masonry is not being triggered when our Ajax runs.
This post shows a method that you might use (if you are good with coding or have access to a coder):
https://support.searchandfilter.com/forums/topic/reload-masonry-grid-after-ajax-call/#post-165867
If those do not work, then you need to use our Shortcode Display Results method:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
AnonymousInactive
Hi!
I’m using S&F Pro to filter a blog view by category and/or author. Unfortunately, I’m having to do this in a prebuilt theme – Salient. The blog is being pulled in via a Masonry blog block.
The only way I’m finding to get results is by 2 adding shortcodes in a block just above the blog block:
[searchandfilter id="428"]
[searchandfilter id="428" action="filter_next_query"]
But this doesn’t seem to work with ajax enabled. I could almost live with this, but now the URL refreshes and doesn’t scroll down to filtered results. Is there a better way to approach this?
Thanks!
I suspect that we are back to the same Masonry issue. I can see that, if you go to another page, some posts are missing images also?
AnonymousInactive
Hello 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
My suspicion, based on what I can see in the page code, is that the grid uses Masonry/Isotope and this may need to be re-triggered. That is a bit complex to do, but this thread discusses how:
https://support.searchandfilter.com/forums/topic/reload-masonry-grid-after-ajax-call/
AnonymousInactive
Trevor,
I was able to get masonry working on page reload by following the post. Thank you!
AnonymousInactive
Hi Trevor,
I posted the snippet of code twice by accident. The other should have been the results snippet.
I tried the custom method for the results using $args[‘search_filter_id’] = 3399; in my custom query and that does not have the same bug of displaying results without hitting submit.
Your direction for the acf field worked, thank you!
I am using masonry for my template to load the items. Currently, using the custom query method I am getting the styling pulled through, how would I get the results to work with the masonry on the page?