#37619 closed feature request (invalid)
Feature to Insert Child Property In Parent Theme Customizer
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Customize | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Please Allow possiblity to insert extra properties from child theme to parent theme existing customizer options.
For Ex:
Suppose there is Color Section Created in parent theme
If I want to add extra color options from child theme to same Existing Color section Of parent theme its Not possible at the moment.
Change History (6)
#2
@
9 years ago
- Focuses ui accessibility administration template removed
- Severity changed from major to normal
Note: See
TracTickets for help on using
tickets.
@footballnasha How is this not possible? In your child theme you'd just add new controls for the desired settings and add it to the same Customizer section that the parent them creates/uses. The issue you may be encountering is that the child theme's
customize_register
handler is firing before the parent theme's, since the child theme'sfunctions.php
is loaded before the parent theme'sfunctions.php
. So what you need to do is use the action priority to ensure that the child theme's code runs after. So for example:Note how the parent theme's
customize_register
hook has a priority lower than the child theme's hook, so this ensures the parent theme's hook will run first, and any section created in it will be ensured to exist when the child theme's hook runs.