• Resolved palmerin

    (@palmerin)


    Hi! I’m trying to find the way to add an empty “option” element to a “taxonomy_select” field type. This option should be empty and it should render before the dynamically generated options for each term in my taxonomy
    I’ve tried the “before” parameter, but that renders before the field, not within it.
    Any help appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    passing 'show_option_none' => true, as one of the field array arguments should get this for you. It’s not shown on the example specifically for taxonomy_select at https://github.com/CMB2/CMB2/wiki/Field-Types but it is on the select example.

    Thread Starter palmerin

    (@palmerin)

    Hi @tw2113 , thanks for your reply. I tried this and it didn’t work, however considering that you developed this plugin, I’m going to go with the possibility that something else is getting in the way, or I’m not running the latest version. This functionality came integrated with an older plugin, so I may have to update the code.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Definitely possible, especially if it’s a really old copy of CMB2 or possibly the original that CMB2 was forked from.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding Custom Option to Taxonomy Select’ is closed to new replies.