• Resolved rscarter1

    (@rscarter1)


    How can I display a list of taxonomy terms in a dropdown on the front end? I’ve been looking through the documentation to no avail. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @rscarter1

    Assuming you are familiar with our template tag [each], please see the docs on the HTML <select>: https://www.w3schools.com/tags/tag_select.asp

    Usually select boxes are only used in relation to forms.

    Cheers, Jory

    Thread Starter rscarter1

    (@rscarter1)

    I treid the each tag, but couldn’t get that to work. I’m trying to create a dropdown of ALL taxonomy terms in that taxonomy, and not just the terms related to that pod post. I’ll try again (and I was using a dropdown select form with that.)

    I’m using this in a pods template and then calling the template on a page:

    <div class="dropdown">
      <button onclick="mydropdownFunction()" class="dropbtn">Departments</button>
      <div id="myDropdown" class="dropdown-content">
    	  [each department]<a href="{@permalink,esc_url}">{@name}</a>[/each]
      </div>
    </div>

    In conjunction with this script: https://www.w3schools.com/howto/howto_js_dropdown.asp

    Still not working yet. The function script is altered to match my form.

    Oh I got it working. Did not need the each tag. Phew! I added the above to the page itself, changedvthe each to reference the pod and template. Kep the template to just the magic tags (url and name).

    • This reply was modified 9 months, 3 weeks ago by rscarter1.
    • This reply was modified 9 months, 3 weeks ago by rscarter1.
    • This reply was modified 9 months, 3 weeks ago by rscarter1.
    • This reply was modified 9 months, 3 weeks ago by rscarter1.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Taxonomy List in Dropdown’ is closed to new replies.