Option to search entire site

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 Ernest Marcinko 1 year, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29683
    esilva16
    esilva16
    Participant

    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!

    #29687
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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.png

    2. 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 :)


    #29699
    esilva16
    esilva16
    Participant

    Perfect! thanks

    #29702
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.