Please can you also put the results.php code into something like pastebin, I will check this first for any issues before logging in.
Thanks
Hi there
That is very strange, would you be able to supply some logins details so I can take a look?
Can you also supply the code of “results.php” in something like http://pastebin.com/
Thanks
AnonymousInactive
SO if I understand correctly, you DO want the “reset” button to show on the results page?
Probably the best solution is to copy the default “results.php” to a new template. Name the template with the ID of your form (eg. if your form has the ID of 215, your new template would be named 215.php)
Put this file in a sub-folder of your Theme, named search-filter. This is where the plugin will look for custom search results template files.
Then in your new template, surround the results with a DIV that has a class that you can style however you want, and you can target that button in that style.
Lastly, use the Shortcode method, and insert the shortcode into the Page Template where you want results to show….enter that Page into the box shown when you select “shortcode” in the plugin settings under Display Results.
In my case, I have the form and results on a custom page template I created, and I have a Page that uses that Template.
In that custom page template, I put the shortcode where I want it (there is other content above and below my search results and form)….e.g. echo do_shortcode(‘[searchandfilter id=”102″ show=”results”]’); (surrounded by the PHP open/close tags, which I don’t think will show here).
In the settings for my form, I select “use shortcode” and enter my Page (URL) in the box (e.g. “http://www.mysite.com/myPage/”).
I hope this helps – by customizing the page on which your form and results display, you have more opportunity to declare your own style selectors, and then style things however you like.
AnonymousInactive
Hey Ross,
I have managed to do it. I have copied the results.php file to theme folder and customised it with the look and sections i want. Now its working fine. Not sure what was the issue with custom template. Strange.
Anyway thanks for your help and time. Appreciate it!
AnonymousInactive
I have other problem. I’m designing the file the results.php but it doesn’t run older posts and new, this show No Results Found and i don’t know why
this is the code that doesn’t run
<div class=”pagination”>
<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>
…
AnonymousInactive
Can I have multiple results.php templates for different forms? I’ve tried, but it doesn’t seem to let me do this?
For example, I have a client search and want to use for 2 separate forms:
/wp-content/themes/my-theme/search-filter/results-client.php
/wp-content/themes/my-theme/search-filter/results-events.php
Hey Stefania
If you wish to use a regular page template for displaying results (like archive-product.php you mention above) then use must use the archive method.
If you are using the shortcode method, and know some html/css, then you can copy the html structure and use it in results.php…
For woocommerce styling, and the correct CSS to be applied, please view the source of the page when on product archives and you will notice woocommerce is adding some classes to the <body> tags for layout purposes – you need to copy the same classes over using the method described here:
https://support.searchandfilter.com/forums/topic/wp-4-2-1-update-affecting-plugin/page/2/#post-17059
Thanks
AnonymousInactive
One more question, how do I style results.php file? I see it uses search-filter.min.css file is that the one I need to modify or I can just add new styling to the style.css in my child theme?
Thanks again,
D.
AnonymousInactive
Thank you Ross. I think I’ll use results.php and will just add some code from the masonry template to make it look decent.
Can you give me some guidance/directions on how to find which part of my theme is causing daterange field not working?