Remove Checkbox for custom post types in frontend search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Remove Checkbox for custom post types in frontend search

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24712
    ahosmer29
    ahosmer29
    Participant

    I’m working on simplifying the front end search.

    On our site we are limiting searches to a custom Post Type. In the Frontend Search Settings, I can leave the label text blank and I can do the same for the Custom Post type, but I still have the checkbox in the frontend search. Is there a way to remove that checkbox?

    How Frontend Search looks with problematic checkbox circled

    Frontend Search Settings for Post Types

    #24726
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Sure! If you don’t need those selectors, you can just simply remove them: https://i.imgur.com/srwOdej.png
    That should do the trick.

    Best,
    Ernest Marcinko

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


    #24733
    ahosmer29
    ahosmer29
    Participant

    I do need to limit searches to a specific custom post type, but I don’t want anyone to see that selector checked on the frontend. Is there another way to hide the checkbox?

    #24734
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    But that does not change the outcome, it is only a visual filter.
    The post types, that had been selected under the General Options -> Sources panel will be used for search. If you want to limit the search to specific post types, then choose them there, the checkbox filter is not required of that.

    If you still need them though, you can force hide them with this custom CSS:

    .asp_checkboxes_filter_box {
      display: none !important;
    }
    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.