Forums › Forums › Search & Filter Pro › Search Form on Top
Tagged: layout
- This topic has 15 replies, 2 voices, and was last updated 4 years, 2 months ago by Trevor.
-
Anonymous(Private) October 4, 2020 at 2:01 am #261805
I have many facets that I’ll have to style in boxes with scrollbars. The problem I’m having is to have the form in the top area of the search results and tags/categories pages. I still don’t grasp this (the pro plugin should have a few templates to build upon on).
To make it easier, how can I have the page results of your example at https://demo.searchandfilter.com/movies/ but with the form at the top and the results in full-width bellow?
If you can give me the actual php template I’ll really appreciate it.Thanks a lot for your kind assistance!
Trevor(Private) October 6, 2020 at 2:38 pm #262076For 1, you would have had to specify a template file to use.
You would need to be using a child theme. You copy that file to the child theme folder, and then edit it to add the PHP do_shortcode code as shown here:
<?php echo do_shortcode('[searchandfilter id="710"]'); ?>
You may also need to make the form horizontal, like this (change the px value to match your theme’s mobile/responsive breakpoint):
@media (min-width: 992px) { .searchandfilter[data-sf-form-id="710"] { display: inline-block; vertical-align: top; padding: 0 20px; } }
These are for guidance only. We do not include customising your theme and templates within the scope of support.
2. You wish to use the Shortcode method, but will need to create you own template. You still need to use our results.php template file, but customize it according to these instructions:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
This is only a simple exemplar template, which uses the WordPress Codex structure and PHP.
So, what to do? You can replace almost anything you want in the file, but keep the if … else … endif and the while …. endwhile and transplant your own HTML, PHP and class names to replace our code. Do this slowly and test regularly, keeping backups at each stage.
The results.php template code will run inside your theme’s standard page template, in the content part, called by our results shortcode.
Again, we do not offer a coding service to do this, but it is fairly standard WordPress code, so you can often copy code from elsewhere in your theme.
-
AuthorPosts