Custom Fields
Re-Envisioned
Support General Select Box – Taxonomy use slug as value?

This topic contains 4 replies, has 3 voices, and was last updated by  pza 2 months, 2 weeks ago.

  • Creator
    Topic
  • #4313

    MD3
    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #4315

    Anh Tran
    Keymaster

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

    #4331

    MD3
    Participant

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

    #4344

    Anh Tran
    Keymaster

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

    #15463

    pza
    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 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.