add_setting and add_control: can I dynamically create them?
-
I want to know whether or not I can dynamically create new settings and controls.
What’s the use case? I want non-technical admins to be able to go to the Theme Customizer to be able to add titles and URLs to a “Featured Pages” and “Featured Posts” section of the home page. However, at the current moment, I have to hardcode each setting and control, such as “setting_1”, “setting_2”, etc.
I’ve considered using
get_theme_mods
, but at this point, I don’t know how I could use that with a dynamically generated set of settings and controls.-Stu
- The topic ‘add_setting and add_control: can I dynamically create them?’ is closed to new replies.