Support » Plugin: OptionTree » Select Label Value

  • Resolved dnaWP

    (@dnawp)


    Apologies if this has been asked before.

    I am having trouble finding the correct function or documentation for an issue I am having.

    I understand how to get to the value of a option that has a select box using ot_get_option( $id ) – this returns the key but how would I get the label that relates to that key? Is there some kind of array I can get and unpack?

    Thanks in advance for any advice.

    https://wordpress.org/plugins/option-tree/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Derek Herman

    (@valendesigns)

    It’s not saved in the option_tree array. You have to get it from the option_tree_settings array, or whatever it’s named in your theme which may be different if you’ve filtered ot_settings_id.

    Thanks for getting back.

    I am not sure I fully understand. You mention that it might be called something different in my theme. Perhaps I misunderstand but do you mean if options-tree is bundled with a theme I may have installed? If so – I just installed the plugin straight. So I am I correct in thinking it would be the name you gave it by default?

    I am also not sure what you mean by “filtered ot_settings_id”.

    If the name of my option is “what_magazine”, what would I need to do to access the data I need?

    i.e. – what is the default name of the options_tree_settings array and how would I access the part I need.

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Select Label Value’ is closed to new replies.