Forums › Forums › Search & Filter Pro › Customize the layout of search form and search results
Tagged: customize the layout
- This topic has 34 replies, 2 voices, and was last updated 6 years, 6 months ago by Anonymous.
-
Anonymous(Private) May 9, 2018 at 7:10 am #176603
It’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.
Anonymous(Private) May 9, 2018 at 7:13 am #176604– Default Search & Filter Pro Search results layout: SFSearchResultsLayout.jpg
– My theme search results layout: MyThemeSearchResultsLayout.jpgTrevor(Private) May 11, 2018 at 8:38 am #176975There almost certainly will be, yes. What you could do for me to enable me to explore that option is:
1. Create a child theme of your theme. It can be really easy to do if you use this plugin and follow the default settings (making sure to select the ‘make active’ option):
https://wordpress.org/plugins/orbisius-child-theme-creator/
You can remove the plugin when done.
2. Use ftp to copy the search.php template file from your main theme into the child theme folder, and rename it to search-results.php
3. Set the search to use that template. -
AuthorPosts