-
AuthorSearch Results
-
October 8, 2018 at 3:35 pm #190426
In reply to: infinte scroll in the plugin doesn't work probably
TrevorParticipantDo you have custom results.php files (usually using the ID number of the form, e.g 565.php) for each form, as detailed here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
(especially the section on multiple forms)
October 8, 2018 at 12:17 pm #190335In reply to: Hide Pagination when using wp-navi instead
AnonymousInactiveHi Trevor,
Yes, I am using shortcode but it was my results.php which needed updating. Thanks for that, all fixed now.
Regards,
VictoriaOctober 8, 2018 at 11:41 am #190321In reply to: Hide Pagination when using wp-navi instead
TrevorParticipantAre you are using our Shortcode Display Results method? If so, it detects if the WP-PageNavi plugin is present and uses that instead. Otherwise you would need to edit the results.php file to replace the navigation code in there. If you are using any other method to display the results, then it is the theme or posts plugin that controls this display.
October 5, 2018 at 8:40 am #190171In reply to: Hide Results until Search is Submitted
TrevorParticipantIf you are using the Shortcode results method, and our results.php template file, it would look like this:
global $searchandfilter; $sf_current_query = $searchandfilter->get(1024)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) { echo '<div>Nothing to see here folks!</div>'; } else { // your template archive code/loop OR results.php code here }
Change 1024 to the ID number of your form (from the form shortcode).
October 3, 2018 at 4:32 pm #190003In reply to: Beaver Builder Integration
TrevorParticipantHi Kendall
Great to speak with you. You are going to try the shortcode method, customising the results.php file as detailed here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
And replace this part:
<div> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p><br /><?php the_excerpt(); ?></p> <?php if ( has_post_thumbnail() ) { echo '<p>'; the_post_thumbnail("small"); echo '</p>'; } ?> <p><?php the_category(); ?></p> <p><?php the_tags(); ?></p> <p><small><?php the_date(); ?></small></p> </div> <hr />
With your HTML/shortcode block. Let me know how you get on?
October 1, 2018 at 7:28 am #189741In reply to: Issues categories search filter
TrevorParticipantYou are now using our shortcode display results method, as described here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
It uses a file called results.php for the template, but it can uses a file named after the form. Eg. form ID #1234 would use 1234.php
As each translated form has its own ID, you can make individual templates for each language using the ID numbers and edit the file according to the Customising guide you see on the page linked to above.
September 28, 2018 at 3:13 pm #189646In reply to: Various Issues
TrevorParticipantThe no more results message can only be changed/added if you are using our Shortcode Display Results method. If you are, then this is an example of the modified results.php:
<?php /** * Search & Filter Pro * * Sample Results Template * * @package Search_Filter * @author Ross Morsali * @link http://www.designsandcode.com/ * @copyright 2015 Designs & Code * * Note: these templates are not full page templates, rather * just an encaspulation of the your results loop which should * be inserted in to other pages by using a shortcode - think * of it as a template part * * This template is an absolute base example showing you what * you can do, for more customisation see the WordPress docs * and using template tags - * * http://codex.wordpress.org/Template_Tags * */ if ( $query->have_posts() ) { ?> Found <?php echo $query->found_posts; ?> Results<br /> <div class='search-filter-results-list'> <?php while ($query->have_posts()) { $query->the_post(); ?> <div class='search-filter-result-item'> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p><br /><?php the_excerpt(); ?></p> <?php if ( has_post_thumbnail() ) { echo '<p>'; the_post_thumbnail("small"); echo '</p>'; } ?> <p><?php the_category(); ?></p> <p><?php the_tags(); ?></p> <p><small><?php the_date(); ?></small></p> <hr /> </div> <?php } ?> </div> <?php } else { //figure out which type of "no results" message to show $message = "noresults"; if(isset($query->query['paged'])) { if($query->query['paged']>1){ $message = "endofresults"; } } if($message=="noresults") { ?> <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'> <span>No Results Found</span> </div> <?php } else { ?> <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'> <span>End of Results</span> </div> <?php } } ?>
The loading icon position, try this custom CSS (it MIGHT work):
.search-filter-scroll-loading:before { display: block; height: 10px; content: ""; width: 100%; } .search-filter-scroll-loading { margin: 10px auto !important; }
September 26, 2018 at 4:15 pm #189428
TrevorParticipantThe shortcode display results method 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:
September 26, 2018 at 1:31 pm #189395In reply to: Filter custom post type on ACF
AnonymousInactiveHi Rob,
Sure no problem. I can send you my custom results.php file.
The HTML used is based on the grid used in the Theme I use, so you would have to create some CSS to make it look like that. Or just copy it from my frontend with Crome Inspector.
Also I’m using some ACF fields, change these to your own fields.Send me a private reply with your email address and I’ll get back to you?
September 24, 2018 at 5:21 pm #189283In reply to: Ajax Filter
TrevorParticipantGreat to speak with you Dave. For now we have set you up using the Shortcode method which seems to work fine (and can work with two forms, which will have identical fields, using only one results shortcode). You have already dropped your own article HTML/markup into the custom results.php template and that seems to work fine.
I look forward top hearing how you get on.
-
AuthorSearch Results