-
AuthorSearch Results
-
September 24, 2018 at 3:15 pm #189259
TrevorParticipantThe results.php file needs a different structure to be use for infinite scroll. Tow exemplar results templates are given with the plugin (look the in the plugin templates folder), but the file must be named either results.php OR 1234.php (or whatever the form ID is).
I am assuming your customised version is in a sub flder of the child theme already?
September 21, 2018 at 10:50 am #188996In reply to: Text appearing in search page
TrevorParticipantHi John. I will be on this in a while. Are you using our Shortcode Display results method, and did you customise the results.php file if you are?
September 18, 2018 at 2:02 pm #188721Topic: Shortcode not working after WP update
in forum Search & Filter Pro
AnonymousInactiveI just updated to WordPress 4.9.8 and I’m on Search & Filter Pro Version 2.4.5.
Since the update my page displays this:
[searchandfilter id=”160″ show=”results”]
…instead of the actual results.
I have a customized the results.php file, which was working perfectly until this update. Any pointers for how to troubleshoot this?
September 17, 2018 at 1:40 pm #188561In reply to: Little improvements
TrevorParticipantYou can replace the contents of the results.php with this:
<?php /** * Search & Filter Pro * * Sample Results Template * * @package Search_Filter * @author Ross Morsali * @link https://searchandfilter.com * @copyright 2018 Search & Filter * * 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; ?> Companies<br /> <?php while ($query->have_posts()) { $query->the_post(); ?> <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>'; } ?> </div> <hr /> <?php } } else { echo "No Results Found"; } ?>
I am not sure what you mean by:
The infinite scroll should be bigger (double size) How can I increase it?
and also
The displayed results (the names of the companies) should not link to the Post-site. They should link to my individual site.
September 14, 2018 at 9:02 am #188385In reply to: Little improvements
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
In the main you would be deleting parts. Are you currently using an unmodified version of that file?
September 13, 2018 at 6:48 am #188296In reply to: Remove the text "…Results Found" and "Page… of …"
TrevorParticipantTo the error; if it only randomly happens, it will be hard to track down, but my first though is that it must be something to do with these settings:
https://www.screencast.com/t/EoLysM5EqD
Maybe try changing what they are currently set at?
Assuming you are using the Shortcode Display Results method:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
If so, I assume you copied the results-infinite-scroll.php template instead of the results.php template when you followed the customising guide there? It still needs to be named results.php in the child theme, so it would need renaming. It looks like this by default:
<?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 { ?> <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'> <span>End of Results</span> </div> <?php } ?>
On line 29 is this:
Found <?php echo $query->found_posts; ?> Results<br />
Simply delete that line and save.
As to the loading icon, this thread might help:
September 12, 2018 at 3:00 pm #188241In reply to: Not searching
TrevorParticipantAh, OK. You would need to be editing that results.php file to add some of your own code, but I have no suggestions as to what that code might be. I think you know which part needs to be changed, yes?
September 12, 2018 at 1:52 pm #188216In reply to: Filter custom post type on ACF
AnonymousInactiveThanks again for directing me in the right way.
I got it to work how I wanted to:http://supernanny.purepixels.nl/onze-au-pairs/
One more functional question if you don’t mind.
I have a custom field with date of birth. With PHP I calculate the current age and display it in the results.php.
I would also like to use a range slider to filter on age, however this field is in the DB as dd-mm-yyyy.
Do you have any advise how to accomplish this?
September 12, 2018 at 1:13 pm #188204In reply to: Raw Search Data
AnonymousInactiveHello Trevor
Thank you for the prompt reply. I actually already thought of doing what you suggested, but I have not been able to determine the contents of the S&F Pro results array in order to link each item of the query result to the Pod data. Can you tell me how I access the data array for the S&F Pro results?
As I mentioned in my earlier post, I tried to find raw search data using your instructions at https://searchandfilter.com/documentation/accessing-search-data/ but none of these do anything. They don’t cause any errors, but neither do they echo/print/display the information that they are supposed to. They literally generate nothing on the page. Can you advise how I access the search results data in order to be customise my results.php with additional data from the Pod?
Thank you for your assistance.
September 12, 2018 at 12:21 pm #188176In reply to: Open result links in same window
TrevorParticipantAre you able to share with me the contents of the customised results.php file that you are using?
-
AuthorSearch Results
-
Search Results
-
I just updated to WordPress 4.9.8 and I’m on Search & Filter Pro Version 2.4.5.
Since the update my page displays this:
[searchandfilter id=”160″ show=”results”]
…instead of the actual results.
I have a customized the results.php file, which was working perfectly until this update. Any pointers for how to troubleshoot this?