This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

How to create a search filter for a checkbox?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How to create a search filter for a checkbox?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46892
    dot832dot832
    Participant

    Hi,

    I am trying to configure a search for a single value in a checkbox filed. For example, the field I am searching is a custom field that is a type checkbox. The value I am looking for is the word “Flower” and is one of 10 possible values. Other fields in the CPT include name, website URL, city, state. If a user clicks Flowers, I want to display all names meeting the flower criteria.

    Would you please advise me on how to set this up?

    Thank you

    #46898
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    If you want to search by the “name” custom field, then I suggest the search by custom fields feature, where you can select the individual custom fields to search by.

    In case you need a filter (like a checkbox type layout), then creating a custom field filter is the way to go.

    #46900
    dot832dot832
    Participant

    Hello Ernest,

    Thank for your response. As a follow up I have two questions:

    1. How can I eliminate the horizontal scroll bar at the bottom of the checkbox list?
    2. How can I position the search results to the right instead of on top of the checkboxes?

    Thanks.

    #46902
    Ernest MarcinkoErnest Marcinko
    Keymaster

    1. It should not be there, my guess there is an added/inherent margin triggering it somewhere. Can I take a look at this? I can probably suggest a modification to prevent it.

    2. Yes, of course. The best way to do that is to use a HTML block container in your theme and use the search and the results shortcode separately wherever you need them.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.