-
Search Results
-
Hi there –
Many thanks again for your help yesterday. Following this great success, I felt a bit adventurous today and started setting things up for a different template to be used for another search form, following your guidelines (https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results).I created a php file (blogs.php) with the exact same content as the results.php file, and put it into the search-filter folder in my child theme. I created a new form and have added the shortcodes ([searchandfilter id=”8959″] and [searchandfilter id=”8959″ show=”blogs”]) to my testpage (cusp.ac.uk/testneu).
Problem: It doesn’t seem to recognise my blogs.php file, and only displays my results when changing ‘show=”blogs”‘ to ‘show=”results”‘.
Question: Is there a form setting I am missing? I.e. Do I need to set it up somewhere in the form itself? (Side info: Whenever I try to manually change it in the shortcodes window (right side of the form set-up), it goes back to the ‘show=”results”‘.
With kind regards –
LindaIt’s absolutely a great plugin, hands down. 🙂
However, I want to customize something to fit my website theme.
1. The search form layout:
– Change the background color of the Reset button and Submit button.
– Put the Reset button and Submit button on the same row.
– Set all Dropdown controls the same size (or specific size).2. The search results layout:
I use “Shortcode” for “Display results method” option. I don’t use “As an Archive” for “Display results method” option because I want my search results to show on a particular page with a specific sidebar, different from the other pages.I add Search & Filter Form Widget to sidebar and the search results will show on a specific page, which has the shortcode [searchandfilter id=”217″ show=”results”].
Everything is OK but I want the search results layout be the same with my website theme. I use SociallyViral by mythemeshop, which has a grid layout with 2 columns per row.
– Default Search & Filter Pro search results layout

– My Theme Search Results Layout

I copied the file wp-content\plugins\search-filter\templates\results.php from the templates folder into the folder in my theme (wp-content\themes\your-theme-name\search-filter\results.php). I tried several times to edit the results.php file to make the layout look like search.php file but failed! :<
So, please help my to customize the search results layout.
Here is the file search.php of my theme: search.phpThank you very much. I look forward to hearing from you.
I have a form with Relevanssi active, displaying results using a shortcode, with a custom results.php template in my theme. It all works great, except that the initial view of the page shows the “No results found…” text from the “else” part of my
if ( $query->have_posts() )code.That’s not a great place to start for people coming to the search page who have not searched for anything yet. I would love to be able to customize my results in this case better.
1. Is there any way, in a newly arrived or reset results page, where there are no
?_sf_s=asdfstyle parameters in the url at all, I can instead show all possible results? Like an unfiltered listing of the post types included in the search form.2. If that’s not possible, can I least customize the returned text to be different than if no results are found? Something equivalent to
elseif (~nothing-searched-yet no-parameters-in-URL~) { echo "Let's get started!"; } else { echo "No result found."; }Does that make sense? Thanks for your help!
Hi agent,
I’ve got a question. We’re using the shortcode show=”results” to display the results. We also fiddled with the results.php to match the outcome with our liking.
I would like to know if it’s possible to show the results at random instead of showing it by date. Especially the results before you filter. I would like them to be random.
Is that possible?
Kind regards,