Dynamic options in theme customizer API
-
Hi,
I have added my own panels to the theme customizer API via the add_section, add_setting and add_control functions.
I’d like to be able to make certain settings appear depending on the selection of a radio button (the same way the static front page section works).
For example if the user selects a radio button with the value of “page” then I want a dropdown-pages control to be shown. But if the user selects a radio button with the value of “iframe” i’d like to render a normal text field for them to enter a URL in.
I’m unable to find any documentation related to using javascript to show and hide customizer controls during use or whether this can be done natively via the API. The static front page section is defined in class-wp-customize-manager.php but this hasn’t yielded any useful information.
Thanks in advance.
Ryan
- The topic ‘Dynamic options in theme customizer API’ is closed to new replies.