-
AuthorSearch Results
-
December 20, 2018 at 4:59 pm #197179
In reply to: Infinite scroll doesn't work
TrevorParticipantIf using the Shortcode method, the file must be called results.php, but the content needs changing to that from the results-infinite-scroll.php
Is this what you did?
December 20, 2018 at 4:41 pm #197174In reply to: Start to Finish Setup exactly like in Demo
TrevorParticipantHi Ryan
I think this very much abridged results.php file is all you need:
<?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() ) { while ($query->have_posts()) { $query->the_post(); if ( has_post_thumbnail() ) { ?> <div> <p><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail("small"); ?></a></p> </div> <hr /> <?php } } } else { echo "No Results Found"; } ?>
It might cause you some CSS issues, I am not sure. However, much of the CSS you wrote to hide stuff would not be needed.
December 19, 2018 at 3:11 pm #197017
AnonymousInactiveHi Trevor,
Aha… of course, sounds obvious! So instead I should try to use the script in Elementor somewhere, I guess…
I used it on multiple locations in the results.php (not at the same time, by the way), but if the site isn’t using that file, obvious it doesn’t show ๐
Just asked Elementor Pro for a bit of assistance (which page I should attack with the Java ๐
I’ll let you know if they have some good intel, haha!
Thanks so far !
Kind regards,
Klaas
December 19, 2018 at 8:58 am #196896
TrevorParticipantDid you make a typo there Klaas? You aren’t using the Shortcode method, so it doesn’t use a results.php template file. Instead, you are using the Custom method, which uses the Elementor post element.
How or where did you apply the javascript?
December 19, 2018 at 1:11 am #196870
AnonymousInactiveHi Trevor,
It’s me again… so sorry ! ๐
Ehmmm.. tried to apply the JS to the results.php, but so far no luck yet, (the pics stick to the posts within the first filter attempt, but as soon as you use another/next filter, the pics still stay away, although the post DO refresh according the filter requests, nicely.)
So could you please help me ? Would it help if we/I post the complete code ? Somehow I have the idea that the location of the JS code inside the results.php might be wrong ?
Kind regards,
Klaas
December 14, 2018 at 5:45 pm #196457In reply to: Updating baseline formatting
TrevorParticipantNo templates folder. results.php goes directly in to the search-filter folder. See this page:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
December 14, 2018 at 5:34 pm #196447In reply to: Updating baseline formatting
AnonymousInactiveThanks, Trevor. So to copy the results.php to my child theme and customize, would I create a folder called “search-filter” at the root of the child theme, then under that add another folder called “templates” housing the templates.php? I’m assuming that the folder structure would need to match.
Thanks for all your help!
December 14, 2018 at 5:20 pm #196427In reply to: Updating baseline formatting
TrevorParticipantYou can edit that file to your heart’s content. Some people almost completely re-write it. It is only intended as a simple exemplar. Often, you will find theme template use a similar If and while structure, and you can often copy and paste chucks of code from the theme templates into our results.php file.
Make sure the copy you are editing is within your child theme folder, in a sub folder called search-filter.
December 12, 2018 at 10:59 am #196033In reply to: Translate Pagination
TrevorParticipantWhat Display Results Method are you using? If you are using Shortcode, then you need to have, or must now, follow the customisation guide here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
And then edit the results.php file now in your chuild theme folder, and find those words and change them and save.
December 5, 2018 at 3:58 pm #195388In reply to: Ajax results not loading in Elementor Grid
TrevorParticipantIn the plugin folder, in a templates sub-folder, are two exemplar files, and our plugin uses the one named results.php by default. This documentation tells you to place one of these two files in a search-filter sub-folder of your child theme. Obviously, if you are using infinite scroll, copy that one, otherwise copy the other.
Then, with that file in the new search-filter sub-folder, rename the file to results.php if needed. It must always be named that, or named the same ID as each for the forms (allows more than one template to be used).
The documentation for this is here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
-
AuthorSearch Results