• Awesome plugin by the way. But does this only support checkboxes, radio and select fields?

    I have a “Directory” custom post type, each post in it is a business listing. I would like people to filter the listings by location. So I have custom fields for Region and City.

    I’ve imported the regions into the database and currently I have a main search bar searching the post content, and a dropdown which lists all the regions. However, I’d like to add an extra text field where people can type in the city name? Is this not possible? I see no text field option….

    I would actually have liked a drop down for cities as well, but I’m pretty sure there’s no way to load only the cities related to the region the user selected (unless there is?), other wise a text field for cities will be fine. Is there a way?

    https://wordpress.org/plugins/ultimate-wp-query-search-filter/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TC.K

    (@wp_dummy)

    Actually you can having the Region – City dependency dropdown options. But it required extra Ajax and JS knowledge and it still depend how you setting the taxonomy for Region and City though.

    For Text input, it is doable. It can be done by the plugin filters. I already have the text input add plugin for meta field only.

    Similar things can be done for taxonomy, but it is not an ideal way to use text input for taxonomy because taxonomy doesn’t support “LIKE” comparison on wp_query class, it only support ‘IN’ and “OR”, which means if the user enter the wrong input (eg. London, to Londun, or lun) will leads to no result found.

    Thread Starter CC-Cailin

    (@cc-cailin)

    Thank you so much for your fast response… good support is quite rare.

    Anywyay. That “text input add plugin” of your seems to be just what I need. Am I allowed to use it on more than one website? I need it for 3 sites and can’t really afford to buy three. Can I buy it once and then use it on all 3 of my sites?

    Also… Is the Region – City dependency a big job? I have basic ajax knowledge. Do you have a tutorial somewhere maybe? or just a rough explination to give me an idea of what needs to be done.

    Another question. The search fields created doesn’t seem to each have unique id’s or classes… is there some way to set manual classes?

    Plugin Author TC.K

    (@wp_dummy)

    Sure, you can use it for as many as you want.

    Also… Is the Region – City dependency a big job? I have basic ajax knowledge. Do you have a tutorial somewhere maybe? or just a rough explination to give me an idea of what needs to be done.

    Well, if you know js, you have to catch the value from Region when the input changed by user, then use the value in the Ajax. Within the Ajax php function, you can use that value to generate the corresponding City terms and output them into the City field.

    Another question. The search fields created doesn’t seem to each have unique id’s or classes… is there some way to set manual classes?

    They do have own unique id for each field. Each field is wrapped in own class eg .tax-radio-* (for taxonomy radio field), .cmf-radio-* (for meta field radio field). The * is the number of the field.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add an extra text field?’ is closed to new replies.