-
AuthorSearch Results
-
January 3, 2020 at 12:50 pm #230156
In reply to: Avada and Infinity scroll
TrevorParticipantI see you are using our Shortcode method. If you want a better looking set of results, this method works well with Avada:
https://searchandfilter.com/documentation/3rd-party/post-grid/
However, with the Shortcode method, see here (you will need to customising section):
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
Except, when copying the file from our plugin templates folder, copy the one for infinite scroll, and rename it to results.php
If you do not actually edit the file, then you can leave the container settings blank, as the form by default expects you to use this template.
December 31, 2019 at 6:15 pm #230048Topic: How to modify the search form template?
in forum Search & Filter Pro
AnonymousInactiveI understand that I can copy the results.php template file to my theme and modify that. However, I’d like to modify the output of the form itself. I want to take the different sections (taxonomies) of my form and put them into tabs. How can I modify the output of the form? Thank you!
December 23, 2019 at 5:37 pm #229731In reply to: Infinite scroll – duplicated post
TrevorParticipantCan you try making a test page and test form using our shortcode method, see here (you will need to customising section):
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
Except, when copying the file from our plugin templates folder, copy the one for infinite scroll, and rename it to results.php
Then see if the repeating post issue remains?
December 17, 2019 at 6:44 pm #229282In reply to: Search results are not being updated
TrevorParticipantI think you have placed the search form shortcode INSIDE the results.php file. This you must not do.
You must put it here:
December 11, 2019 at 1:49 pm #228861In reply to: Pagination Issue
TrevorParticipantIf you are using code from our results.php file, you may want to install the WP_PageNavi plugin and that should allow numbered navigation (you will see the code in the standard results.php file).
December 11, 2019 at 12:23 pm #228836In reply to: Infinite scroll not showing more results
TrevorParticipantIt may be, but the root of the problem is the structure of the page template, and the way your theme works. In the end, it might be better to create a test page using our shortcode method, and then customize that to give you what you want, and then simply replace the code in your home page template with our results shortcode.
So, to do this, follow these instructions:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
Including the Customizing the Results part, but for Infinite Scroll, step 2 would be this:
2. Copy the file wp-content\plugins\search-filter\templates\results-infinite-scroll.php from the templates folder in to the newly created folder in your theme – wp-content\themes\your-theme-name\search-filter\results.php
Notice how that file becomes named results.php
Once that is working OK on the test page, we can then alter the code in it to output to better match your theme.
December 5, 2019 at 6:59 pm #228509In reply to: REMOVE TEXT PAGINATION
TrevorParticipantIf you are using our Shortcode results method, you can customise the results.php file, where the HTML structure, divs etc, can be found. See here for how:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
The lines (#29&30) you may want to add a wrapper around at the top is this:
Found <?php echo $query->found_posts; ?> Results<br /> Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />
Maybe like this:
<div class="top-found-post-pages"><p>Found <?php echo $query->found_posts; ?> Results</p> <p>Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?></p></div>
And at the bottom the line is by default #73
You can edit the file where you want and the HTML also.
IT IS RECOMMENDED TO USE A CHILD THEME.
You can easily make a child theme using a plugin from Orbisius. Follow the default settings and it should work. You can remove the child theme maker plugin after use.
December 5, 2019 at 11:35 am #228438In reply to: How to hide "Found 6 Results Page 1 of 1" ?
TrevorParticipantIf you are using our Shortcode results method, you can customize the results.php file, where the HTML structure, divs etc, can be found. See here for how:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
The line (#29) you may want to remove is this:
Found <?php echo $query->found_posts; ?> Results<br />
You can edit the file and messages also.
IT IS RECOMMENDED TO USE A CHILD THEME.
You can easily make a child theme using a plugin from Orbisius. Follow the default settings and it should work. You can remove the child theme maker plugin after use.
December 5, 2019 at 11:31 am #228434In reply to: Custom Results Page – Order results by ACF value
TrevorParticipantYou should not be adding the query into the results.php file.
Instead use the Posts tab in the form design, and that has a sort option. Use Meta Value, select the ACF key name (make sure it DOES NOT start with an underscore) and then sort direction. See here an example:
https://www.screencast.com/t/rVKgFNJl7FD
Note, when you sort in this way, any post that has no value set will be excluded from the results.
November 28, 2019 at 6:12 pm #227954In reply to: Only title search
TrevorParticipantTwo answers.
The title only search. You will need to follow the instructions for using the 3rd party Relevanssi plugin, here:
https://searchandfilter.com/documentation/3rd-party/relevanssi/
You will need to look through the Relevanssi plugin options for what it searches, and whether it searches for whole words etc. I would not recommend the relevance option in your case.
The image to be clickable. Follow these instructions to be able to modify the results.php file:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
In the standard results.php, see lines 56-62 (yours may now be different) for the image code:
<?php if ( has_post_thumbnail() ) { echo '<p>'; the_post_thumbnail("small"); echo '</p>'; } ?>
This would need to be changed to:
<?php if ( has_post_thumbnail() ) { ?> <a alt="<?php esc_html(get_the_post_thumbnail_caption());?>" href="<?php the_permalink(); ?>"><?php the_post_thumbnail("medium");?></a> <?php } ?>
Notice I changed the image size also. There are many different sizes you can pick. Normally, the smallest is
"thumb"
-
AuthorSearch Results
-
Search Results
-
I understand that I can copy the results.php template file to my theme and modify that. However, I’d like to modify the output of the form itself. I want to take the different sections (taxonomies) of my form and put them into tabs. How can I modify the output of the form? Thank you!