Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Option to search entire site
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 2 years, 8 months ago.
- AuthorPosts
- October 7, 2020 at 9:24 pm #29683
Hi!
I want to give the customers 3 options: Search in products, search in recipes or search the entire site. But I don’t see the option to enable this last filter (entire site, everywhere). This would include pages and posts, everything.
Is there a way I can achieve this? This is the link where I’m testing the Ajax search bar, in the header: https://thebikinichef.com/test/
https://prnt.sc/uv036k
Please let me know,
Thanks!October 8, 2020 at 10:05 am #29687Hi,
Well, that option is not exactly for that purpose – it is for “Select all” checkboxes, which is not the same as search everything. For this to work, you need to add all the other post types as well to the filter.
However, I think there might be a way to “hack” this with some custom CSS, but I am not sure if it will work:
1. First, choose all the post types you want to search, under the filter options: https://i.imgur.com/NHzuGx6.png
This should print additional checkboxes below the existing ones, they should be unchecked: https://i.imgur.com/y3WQBjR.png2. Apply this code to your theme custom CSS field (if it supports it) or use the custom CSS field on the search plugin back-end:
fieldset.asp_filter_cpt .asp_simplebar-content>div:nth-child(n+5) { display: none !important; }
This custom CSS will actually hide the newly added checkboxes – but they will still act as a filter. When the user hits the “Search all” checkbox, these filters get “checked” invisibly, enabling the search on all of the selected post types.
We can only hope this works.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 8, 2020 at 10:07 pm #29699Perfect! thanks
October 9, 2020 at 6:14 am #29702You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.