one of my clients have Branches. one located in new york another in los angeles and etc...

in the live site we print new york phone and address(from the customizer) as default.

what i need is to create drop down menu with all the Branches in the live site.

when the user will select "los angeles" for example, the phone number and the address will be updated based on customizer value (for each Branch i have field with phone and address).

in php i can simaple get the value by:

echo get_theme_mod( 'newyork_phone' );

the question is how can retrieve all the values i need from the customizer, based on user choose?

    wp.customize("newyork_phone", function(value) {

i tried to play with this code, but id did not get how can i get the "value" and print this in my theme?

in the theme customizer i am using this code:


        'label' => __( 'Phone', 'test-admin' ),
        'section' => 'title_tagline', 
        'settings' => 'newyork_phone', 
        'priority'    => 15,
        'type' => 'text'

in the header.php i am using:

<select name="branches">
  <option value="newyork">new york</option>
  <option value="losangeles">los angeles</option>

then in jQuery i can get the value by:


example: option one is "new york"

i want to get values:




option two is "los angeles"



and show the values in my theme.

  • Do you want to update the values in the customizer theme preview or in the live site once the customizer options have been saved? – cybmeta Mar 10 '15 at 8:20
  • Hi @cybmeta i want to update the values in the live site once the customizer options have been saved. – need-help Mar 10 '15 at 8:31
  • Are you defining the setting as theme_mod type or option type? – cybmeta Mar 10 '15 at 8:53
  • @cybmeta i have updated my question. – need-help Mar 10 '15 at 9:48
  • Hi @cybmeta can you help me with that? – need-help Mar 10 '15 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.