-
AuthorSearch Results
-
March 5, 2019 at 11:59 am #203951
In reply to: Hide results by default
TrevorParticipantThe hide results code is like this:
global $searchandfilter; $sf_current_query = $searchandfilter->get(36613)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) { echo '<div>Nothing to see here folks!</div>'; } else { // your current results.php code here }
… where the ID number will need to be changed to match your form ID
March 5, 2019 at 9:44 am #203918In reply to: Hide results by default
TrevorParticipantWhat template is your search page using? The issue with using the WooCommerce display results method is that, by default, it redirects back to shop page.
Whilst it may need additional coding, the Shortcode display results method allows you to stay on your shopping guide page, AND (with some simple code tweaks) allows a blank no results showing until the filter is used.
It allows you to edit the results.php template and pretty much copy and paste code from an existing template to get the look and feel of your theme.
March 5, 2019 at 9:34 am #203910In reply to: Combining shortcode, infinite scroll & masonry
TrevorParticipantYou are using our Shortcode Display Results method, and the code you sent is the modified results.php template file you have edited? How do you apply the masonry javascript to that? Does masonry work on the initial page load, but not when more posts are loaded?
March 4, 2019 at 4:33 pm #203859In reply to: Link on pagination error when load
TrevorParticipantThe problem is that you have re-coded the results.php to use the Easy WP Page Navigation plugin, but that is over writing our code.
If you returned the code back to our standard pagination, does that then work (but does not look good)?
Our code is designed to work with the free WP-PageNavi plugin also.
February 26, 2019 at 10:50 pm #203409In reply to: Making the Image Thumbnail a hyperlink in results
AnonymousInactiveHey Trevor,
Thanks for the quick reply. I double checked on our staging site and editing the results.php file is making changes to what displays on the page.
How can I edit this block of code to make the image hyperlinked as well?
<?php
if ( has_post_thumbnail() ) {
echo ‘<div class=”lq_thumbnail”>’;
the_post_thumbnail(“small”);
echo ‘</div>’;
}
?>February 26, 2019 at 9:35 pm #203403In reply to: Making the Image Thumbnail a hyperlink in results
TrevorParticipantYou appear to be using our ‘Using a Shortcode’ display results method, but the results do not appear to be from our standard results.php file? Have you modified it already, as described here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
Your theme appears to be Divi, for which we have an integration guide. You can see this here (we do also have a beta addon for Divi, but it may not be fully ready for live use yet):
https://support.searchandfilter.com/forums/topic/divi-and-sf/#post-127431
February 26, 2019 at 4:03 pm #203357In reply to: SF Pro / Events Calendar Pro Question
TrevorParticipantIt looks like the only way we can get this working using their shortcodes would to be to develop an addon to specifically support that plugin. In the meantime, you would probably need to use our ‘Using a Shortcode` display results method and customise the results.php template. I have no doubt that we could do this, but as part of the V3 development cycle, probably in V3.1 or later, but not in V3.0. That would, therefore, be some time away yet.
February 26, 2019 at 11:17 am #203280In reply to: S&F displays no results from ACF Fields!
TrevorParticipantThe shortcode display results method (is that what you are using?) uses our exemplar template – results.php. The basic steps for customising the file are set here, but you would need to do the coding:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
The ACF documentation gives you how to get the data from their fields. This post shows an example results.php template file that gets ACF fields:
February 25, 2019 at 12:20 pm #203144In reply to: Issue with Infinite Results
TrevorParticipantI can’t see anything obviously wrong. Whilst you have created your own custom results.php file (I can see form the content), you appear to have the correct HTML structure still.
Can you try this with our standard results.php file?
February 21, 2019 at 6:29 pm #202910
TrevorParticipantThis post explains how:
https://support.searchandfilter.com/forums/topic/results-display-3/#post-202121
The guide to customising the results.php template file is here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
-
AuthorSearch Results