Select Box - Taxonomy use slug as value?

Support General Select Box - Taxonomy use slug as value?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4313
    MD3MD3
    Participant

    I have a taxonomy used for selectbox and i want to use slug as value instead of ID. How to do that?
    I tried adding an array in ['options'] but its not working

    #4315
    Anh TranAnh Tran
    Keymaster

    Unfortunately, it's not supported at the moment. Taxonomy field (and user, post fields) stores the term IDs in the database.

    #4331
    MD3MD3
    Participant

    Thank you. Hopefully you an support it in your next update.

    #4344
    Anh TranAnh Tran
    Keymaster

    Just curious, why do you need to store slug instead of ID?

    #15463
    pzapza
    Participant

    Hey Anh - bumping this old topic, hope you see.

    I too would like to use the taxonomy slug in the Taxonomy select field.

    My purpose is in a custom search form using MB fields. WP doesn't seem to search term IDs passed along by URL.

    • Any suggested way to do this?
    • If I could add data-slug attributes to the taxonomy <option> elements, that would also help (instead of changing the option value)

    Much thanks

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