Forums Forums Search & Filter Pro Creating Dynamic Search Filters

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #42014

    Hello!

    I’m creating a search form that will query companies in many different areas around New Zealand. The areas or organized first by District, then Region. Each District has a different set of regions. Is there a way to change the options that are selectable in the region filter depending on what is selected in Districts?

    Thanks!
    Nick

    Trevor
    #42029

    This can happen automatically if you enable auto count in the General options and hide zero (empty) values in each meta object on the form. This assumes that you have correctly organized the data you are filtering. I am assuming that you have separate custom taxonomies for Districts and Regions?

    Anonymous
    #42117

    I’ll try this out now and see if it works. What is the correct way to organize the data I am filtering? I’ve created post type called “company” and it has a district and a region. Should I make separate post types for each of these? If so, how do I do that an link them together?

    Trevor
    #42128

    Hi Nicholas. Are companies a Custom Post Type? If they are, in the WP Post editor for each company, as you edit or add a new one, do you want whoever is authoring them to be able to add the Districts and Regions themselves, or pick from a pre-defined list?

    Secondly, will you also want pages for Regions and Districts, to be able to show the companies listed in them?

    It may be that what you are trying to create is what is called a relational database, which is very hard to do in WordPress but can be faked using iframes, IF you have a flexible enough theme. I am building a demo one right now as a music ‘Gig Guide’.

    Anonymous
    #42557

    Hey Trevor,

    Companies are indeed a custom post type.

    I’m trying to create the same effect that you get with FacetWP. If I were creating this with Ruby on Rails, I’d have districts, regions, suburbs, and companies all on different tables with foreign keys..etc although here I wasn’t sure how to do this using this plugin without creating all those tables, or even if I did, I wouldn’t know how link them together.

    Trevor
    #42590

    Hi Nicholas

    This might be easier if we could actually chat properly, rather than this delayed messaging. Do you have Skype on a PC/Mac desktop or laptop (with at least a mic, or maybe a webcam)?

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