Multiple Search box to display specific set of content
3 years, 11 months ago #11517
I am currently evaluating your WPSolr plugin and my requirement is that I want to use a search feature to display the indexed results of “blog posts” in the blog page and “courses” in another page. If I understand correctly when I configure WPSolr and contents (Pages, blog posts, courses, etc.) and use a search box anywhere in the website, it will display the results from all different items and not specific for Blog-posts, pages, courses, etc. Is there any way to allow a search box to only display content from blog posts on one page and only from pages (or courses/Lessons) on another?
If so, please provide the step by step process to implement this.3 years, 11 months ago #11662
On your current search page, click on your “type” facet, and notice the filter parameter added to the url (for posts, pages, …).
Now, on your search boxes forms, add a hidden parameter with the same field name and field value (in the html code, or with a bit of js). The hidden parameter will be added to the url and your search filtered by type.3 years, 11 months ago #11674
The support provide assistance on implemented features.
For this feature, I suggest either:
– Ask for a new feature in https://www.wpsolr.com/forums/forum/technical-configuration-issues/new-features-requests/
– Ask for a custom work as described in https://www.wpsolr.com/forums/topic/do-you-provide-custom-work/3 years, 11 months ago #11675
Also, this workaround is good for the search results but the WPSolr widget that has been used on the page still displays the values (such as Authors, Tags etc.) of all the results found in the Solr index. For example, when I see the WPSolr filter options on the blog page, I can see the author who wrote a lesson/course. Is there any ways to only display the values that belong to say posts, pages, course, etc.?
You must be logged in to reply to this topic.