WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok here's the scenario: I have added a custom section to an existing theme so that it shows up in the theme customization page (customize.php). The problem I am having is that I don't know how to notify wordpress when changes are made in my custom control. I guess I am missing something in my code because it should do it in automatic?

Here is some sample code:

        'title' => 'My title',
        'description' => 'My description',
        'priority' => 201

        'default' => '',
        'type' => 'option',
        'transport' => 'postMessage'

    new My_Control(
            'label'    => 'My label',
            'settings' => 'my_setting',
            'section'  => 'my_section'

Note that My_Control is a class which enqueues additional js/css files and renders my sortable list. I am storing my model in an array rather than using multiple settings; I add my model to the page using the wp_localize_script function.

share|improve this question

Real-time updating is achieved with JavaScript. Is your .js code working? The Codex has great examples and I think Otto has a defacto post about it somewhere on Google.

This has everything you need: https://codex.wordpress.org/Theme_Customization_API

share|improve this answer
Yes, my js code is working properly, I'll have a thorough look at the documentation. Thanks for answering by the way – Warrior Mar 17 '14 at 8:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.