Forums › Forums › Search & Filter Pro › Site wide search
Tagged: search, site search post tag
- This topic has 5 replies, 2 voices, and was last updated 8 years, 4 months ago by Trevor.
-
Anonymous(Private) June 28, 2016 at 10:11 am #49593
Hello,
I would like to know if I can use this plugin for a site wide search, rather than just specific to a post type.
Currently the site i’m working on has a search field input on the home page. This also uses Dave’s live search and the Relevanssi plugin. But its on the results page that I would like to use this plugin. How would I get the search term to be posted to the filters on the search page?
Also is it possible to build a filter form but move the search box to another area on the page?
Any assistance with this would be hugely appreciated
Many thanks
Trevor(Private) June 28, 2016 at 11:50 am #49605Q. I would like to know if I can use this plugin for a site wide search, rather than just specific to a post type.
A. Yes, you simply check all post types you want it to include.Q. How would I get the search term to be posted to the filters on the search page?
A. Whilst with a lot of hacking it might be possible to have a search box on (say) the home page, send results to the search results page, and for the S&F form to them pick that up, it is not easy. Better to make a search form in S&F as just the search box on the home page (with Relevanssi support enabled) and use that to send the search string to the search results page, where another more complex S&F form can pick up the search term.Q. Also is it possible to build a filter form but move the search box to another area on the page?
A. I am unsure what you mean.Anonymous(Private) June 28, 2016 at 2:08 pm #49644Thanks for getting back to me,
With regards to my question about the search term being posted to the filters on the search page, could you give me an example of how i would do this? specifically how i would send the term from one form and then to be picked up by another?
Thanks again
Trevor(Private) June 28, 2016 at 2:15 pm #49645Let us say that I had made 2 forms; ID #1 and ID #2
Id #1 is a simple search field and is set As an Archive and sends the search to the results page. It does this as a get query in the url, just as a normal WP search would, but the format is slightly different.
The result page has form ID#2 on it. That also has a search field, plus many other fields. It also shows the results. ID#2 form has the same page as its results page. As the page opens, ID#2 detects the search term in the url and applies this both to the form (the searched for term would be in the search field) and to the results.
Anonymous(Private) June 28, 2016 at 3:53 pm #49665Great I understand.
I think i’ve nearly got this working.
Last few questions
Q1. If i have a form with the ID#2, this form has various fields including a search form. is there anyway to use the search field in another area of the page? Or can I use another form which only has a search field on the same page.
Q2. I’m trying to set up pagination on the search page using pagenavi, but can’t seem to get it to work? are there some special parameter that i have to declare?
Thank you
Trevor(Private) June 28, 2016 at 5:09 pm #49667You could put a search box elsewhere on the page, but using it would clear any parameters in the other form that had already been set.
Does the form setup require you to specify the class used for pagination, and if you look at the page, does it use the same class as shown by default in the form
.pagination a
? -
AuthorPosts