$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Theme Customization API and child themes|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Theme Customization API and child themes

matteradmin9PV0评论

I've recently developed a parent theme that makes heavy use of the Theme Customization API. Is there an easy way to port these settings when a user activates one of my child themes? Currently, the data previously saved in the Customize screen disappears when activating a child theme. Of course, once they reactivate the parent theme, the settings return.

Any dealt with this yet?

I've recently developed a parent theme that makes heavy use of the Theme Customization API. Is there an easy way to port these settings when a user activates one of my child themes? Currently, the data previously saved in the Customize screen disappears when activating a child theme. Of course, once they reactivate the parent theme, the settings return.

Any dealt with this yet?

Share Improve this question asked Feb 7, 2013 at 16:59 clarkclark 5912 silver badges10 bronze badges 2
  • 1 Are you using the Settings API or the Theme Mods API for your Theme settings/Theme Customizer integration? – Chip Bennett Commented Feb 7, 2013 at 18:37
  • Using Theme Mod. All settings on the "Customize" screen, calling them in my theme with get_theme_mod. – clark Commented Feb 8, 2013 at 14:44
Add a comment  | 

1 Answer 1

Reset to default 1

There is already an answer about this question with explicable examples How do I get a parent theme modification from a child theme?.

You can also check about get_theme_mod here https://developer.wordpress/reference/functions/get_theme_mod/

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far