Forums › Forums › Search & Filter Pro › Customising the Results
- This topic has 22 replies, 2 voices, and was last updated 8 years, 8 months ago by Trevor.
-
Anonymous(Private) March 30, 2016 at 12:02 am #40912
Hello,
thank you for the plugin!
I have a problem customising the results.
I use the “Using a Shotcode” display results method.I did what you described in your documentation:
Customising the Results
If you wish to customise the display of your results, you must override the default template that is being used by Search & Filter:
Create a folder in your theme folder called search-filter.
Copy the file wp-content\plugins\search-filter\templates\results.php from the templates folder in to the newly created folder in your theme – wp-content\themes\your-theme-name\search-filter\results.phpFrom now on, Search & Filter will load this version of the template instead of its own – so you can make any customisations that are necessary.
Unfortunately this did not change anything. They look the same way as before.
They don´t look like the results I get when using the standard search on my template.
I would like the results to appear in the same way they appear in the standard search on my template.When I use the display results method “As an Archive” the results look great.
But the results are on a different page and you said the Ajax is slower.Best regards,
GeorgTrevor(Private) March 30, 2016 at 8:01 am #40932I need to be clear on what you did. Did you follow the first section instructions on that same documentation page, as follows:
- Create a new Search Form
- Add some fields to the Search Form UI by dragging from the Available Fields box in to the UI box – for this example lets just add a Search Field and a Submit Button
- In the Settings box, under the Display Results tab select “Using a Shortcode” – you will now notice the Shortcodes meta box (underneath the Publish box) has an additional secondary shortcode called the Results Shortcode.
- Publish this.
- Now, create a New Page, on this page add both the shortcodes found in your Shortcodes metabox (your IDs will be different):
[searchandfilter id="1428"] [searchandfilter id="1428" show="results"]
- Publish the page, and then click View Page
- Copy the Full URL of this page from the address bar and paste into the the S&F form, in the Results URL option and update (this can be found in the Display Results tab).
Did you also make changes to the results.php file to customize it?
If so, can I see the live page?
Anonymous(Private) March 30, 2016 at 10:43 am #40960Now I see the problem.
I did not make any changes to the results.php file to customize it but just copied it.
Sorry, I am new to this.I now opened the results.php in an editor and I also opened the search.php from my template.
Do I have to copy the whole text from the search.php to the results.php?Trevor(Private) March 30, 2016 at 1:44 pm #40991OK. It seems to me that we ask a user to choose between shortcode or archive, but you want a hybrid of the two to achieve what you want. It isn’t possible using S&F out of the box. BUT … it is possible (but by you, not us as it is not really in the remit of support) to choose to use the shortcode method and to copy over html structure from one to the other. It’s just a drawn-out process of copying over php and html structure and making sure that it works, making sure the theme’s css works with it (adding or changing css classes and HTML markup as necessary). So, it can be done.
BUT … it looks like the only thing stopping you from using a template in your theme with archive display mode is the URL. In which case, if you select archive mode, you could use the “set a slug” option under display results, so you could get a URL like you want.
-
AuthorPosts