List Results based off of multiple taxonomies

Is it possible to pull up multiple taxonomy based off of a the select field search option? For example I have 2 dropdown select option fields and I want it to be able to search for multiple taxonomies I have set. Is that possible? I tried searching around with no success.

In what context? It sounds like you are populating a form.

Sorry, I was rather vague but not very good at explaining things.
But yes pretty much a dropdown form. So several dropdowns and each dropdown will show the different taxonomies I have. When I click search, I want it to pull in the different taxonomies based off of the select field.
I only have one working so far, I would like to add more. Below is a little cheat I did

      <select name="state" id="status-dropdown">
        {{ range $name, $taxonomy := .Site.Taxonomies.state}}
        <option value="{{ $name | urlize }}">{{ $name | humanize }} ({{ $taxonomy.Count }})</option>
      {{end}}
      </select>
    </div>
  </div>
  <div class="control">
    <button type="submit" class="button is-primary" onclick="siteRedirect()">Choose</button>
  </div>

and my Javascript

<script>
  function siteRedirect() {
    var selectbox = document.getElementById("status-dropdown");
    var selectedValue = "{{ .Site.BaseURL }}" + "status/" + selectbox.options[selectbox.selectedIndex].value;
    window.location.href = selectedValue;
  }

</script>

Pretty much building a real estate site and trying to find a way to make it searchable based off of multiple taxonomies. The taxonomy I have is state. I would like to add city and other things.

Hi there,

Have a look here at something I posted about a while back: Filter content by tags, sections, etc using JS

Thank you! This seems to be what I’m looking for. Haven’t gotten the chance to try it out but definitely what I’m looking to do - filtering content based off of categories. I’m still fairly new to Hugo so if I can’t figure it out I might as well just end up paying you to help :rofl:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.