AnonymousInactive
Hello,
wen need to “tweak” the layout of the Filter Section above the results. The results are properly formatted in /templates/results.php, but how to change the HTML for the filter section?
Is there a way to customize this layout without losing changes after update?
Thank you very much.
AnonymousInactive
Hello, I am using Serach & Filter Pro and Relevanssi. And it is working fine. Sometimes the results design is not using my results.php in my theme folder. I cleared my browser cache.
I have referred this to our plugin developer, Ross, for his attention.
To confirm, you ARE using Divi, but instead are using our Shortcode display results method (and thus a custom results.php template file), and not using our extension for Divi.
In the Search & Filter plugin folder, in the subfolder named templates, are two files. Normal pagination template is results.php
, and there is another for infinite scroll, with a similar but different structure.
Which one did you use?
Whichever one you used, you need to first follow our guide when doing that:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
The file must be renamed to either results.php or {the number of the form ID}.php
What you should have done (and maybe did not) is to copy the results-infinite-scroll.php
template file to your child theme search-filter
folder, and then rename that copied file to results.php
Then you would edit that file, making sure to keep the general structure and some of the classes intact. The key classes in that file are:
search-filter-results-list
search-filter-result-item
AnonymousInactive
Also the file is titled results.php within the subfolder
AnonymousInactive
Hi trevor
I have used the shortcode and created the relevant sub folder in the theme for search-filter and used the results.php template initially when creating the loop. When I wanted to activate infinite scroll I copied the infinite scroll template php file and used this instead.
I can send a copy of the template i have created if required?
Kind regards
Great. I got those, and that prompts a first question.
In the Search & Filter plugin folder, in the subfolder named templates, are two files. Normal pagination template is results.php
, and there is another for infinite scroll, with a similar but different structure.
Which one did you use?
Whichever one you used, you need to first follow our guide when doing that:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
The file must be renamed to either results.php or {the number of the form ID}.php
What you should have done (and maybe did not) is to copy the results-infinite-scroll.php
template file to your child theme search-filter
folder, and then rename that copied file to results.php
I see that you are using our Shortcode method …
… in which case you should follow the ‘guide to customising’:
https://support.searchandfilter.com/documentation/search-filter-pro/search-results/using-a-shortcode/
Once you have a copy of the results.php
file in a search-filter sub-folder of your theme, you can edit that file.
First though, install the free WP-PageNavi plugin. Then you can remove the standard pagination in the results.php file you have in your child theme folder. You would need to remove these lines:
<div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div>
<div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div>
Are you able to send me a live link/URL to your search page so I can take a look?
Would you be opposed to using a free pagination plugin?
Have you looked at the exemplar results.php file in our plugin templates folder (designed for use with our shortcode method, but is editable – see our documentation at https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results) …
… and you could simply put your code into that (a lot of which you would not need).
If you are customising the results.php file, the type of help you are looking for does not fall within the scope of our support, sorry. You might need to consult a third party coder. However, I may be able to help.
What theme are you using?
Do you have any page builder plugins?
Does your theme have a ‘grid’ layout pages that you are trying to copy (are you able to show me, a URL, such a page made with your theme, and does that page use a single PHP template file to make the page)?
Are you able to send me a live link/URL to your search page so I can take a look?
If you look in our documentation:
https://searchandfilter.com/documentation/
In the right sidebar you will see a section ‘3rd Party’ where many page builder type plugins are covered. Many have free extensions for our plugin that you can download (if you are logged in) from the top of each page. My personal preference is to use Elementor Pro for this type of grid.