• I’m creating a wp_customize section to change the layout of my sidebar by changing the class of my sidebar in register_sidebar().

    The variable passes correctly and will change the class. However, since register_sidebar runs at widgets_init I need to save the setting and refresh the theme customizer to see the changes.

    How can I get the setting change to refresh and update automatically like the other settings?

    I’m passing get_theme_mod(‘custom_setting’) as a class inside the ‘before_widget’ => <div class=”get_theme_mod(‘custom_setting’)”>.

Viewing 1 replies (of 1 total)
  • Thread Starter nwp_developer

    (@nwp_developer)

    On a related note how do you make $wp_customize->add_control show on refresh of another control selection? I can create an if statement that tests if the value is select in the top control to show the bottom control. However, it only updates when physically refreshing the page and not when the theme customizer refreshes the changes for preview.

Viewing 1 replies (of 1 total)
  • The topic ‘Dynamic Class Sidebar’ is closed to new replies.