Forums › Forums › Search & Filter Pro › Styling Shortcode results
- This topic has 2 replies, 2 voices, and was last updated 6 years, 4 months ago by Anonymous.
-
Anonymous(Private) June 20, 2018 at 1:08 pm #180776
Hi,
When I configure a search to show me results as an archive I get a nice pretty search results display which is great. See here:
http://www.citysecuritymagazine.com/newsite/?sfid=1713&authors=andrea
However, I want to use a shortcode for my search results display as I want to define other elements of the page that I could not define on the search archive page.
When I use the shortcode on another page I get a quite unattractive search display that looks like this:
http://www.citysecuritymagazine.com/newsite/search-results/
Is there an easy way to style what I get in the shortcode results list so that it looks just like the archive results list?
I’ve read this page about how to customise results: https://searchandfilter.com/documentation/search-results/using-a-shortcode/
However, that seems to show me how to set up the file, but it doesn’t tell me how to style it. Could I copy the code from the archive page in some way to make this look the same as the archive page?
Thanks!
Trevor(Private) June 20, 2018 at 4:04 pm #180803Hi
If you followed that guide, you will have a copy of our results.php file in your child theme folder (in a sub-folder named
search-filter
).Yes you can edit the file. It follows the WP Codex standard for making an archive page. Most likely your theme archive.php file will look similar, and it is the section inside the while loop that you shoudl focus on. It is quite likely that your theme code can be transplanted here, but it may require some modification to get it to work, depending on how closely your theme also follows the same WordPress Codex standards.
We don’t have a guide as to how to do this, as every case would be very different.
-
AuthorPosts