Assuming that the parent theme is running the above code at customize_register priority 10, you just have to add another customize_register action callback that runs afterward, like at 20. However, you cannot move a control to a panel. Controls can only reside inside of sections. To move a control to another section you can use:
add_action( 'customize_register', function ( WP_Customize_Manager $wp_customize ) {
$wp_customize->remove_section( 'font_selection' );
$wp_customize->add_section( 'some_other_section', array(
'title' => __( 'Some other section', 'theme' ),
) );
$body_font_family_control = $wp_customize->get_control( 'body_font_family' );
if ( $body_font_family_control ) {
$body_font_family_control->section = 'some_other_section';
}
}, 20 );
Related Posts:
- New WP_Customize API – how does it work under the hood?
- Disable Visible Edit Shortcuts in the Customizer
- How to Add Customizer Setting in Child Theme
- customize_register with Multiple controls/settings – how to get values?
- Manipulating post meta in the customizer
- Widgets not working in Customizr but working in Appearance
- In the new Theme Customizer API, how to send a value from the front back to the admin panel?
- get_theme_mod(); returns nothing
- How to get input_attrs in the sanitize function?
- How to change in customizer the “site identity” tab required capabilities
- Customizer image control default value showing in customizer but not on frontend
- Customizer: How do you add HTML to control labels?
- Add new Control to Customizer to modify Headings (h1, h2, h3…) Color
- How to extend nav-menu-item-control data in Appearance > Customize?
- What will happen to the additional CSS when the theme is updated?
- Convert an theme options page to use in customize.php also?
- Add more then one site logo – custom-logo theme support
- Hide devices selection from customizer?
- Fatal error in wp-admin/customize.php after fresh install due to null $wp_customize
- Enabling Additional CSS / custom-css
- Can not sanitize select control in customize api
- Bind JS event to WordPress control customizer
- For a specific theme, how do I build a list of all the possible theme modification names?
- Save & Publish disabled for two dimensional array Customizer
- Allow guests to use WP Customizer but disable save button
- How do I remove a customiser option from a parent theme in a child theme?
- How to add css option to Header Image customizer?
- Trigger Customizer Publish (save) Action
- How to edit alternate inactive themes in “Appearance -> Customise” screen?
- Is it necessary to prefix theme_mod, section id and panel id in the customizer?
- Hide Customizer’s Widget Choices From The List
- theme customizer – can a single option pass multiple values?
- Remove Customizer Control Choices (Type: Radio Array) using Child Themes
- Dynamic Control in customiser
- Is it possible to rename a customizer control heading?
- Is it possible to add custom badges to product attributes conditionally, based on custom field?
- Will WordPress updates remove Gutenberg Additional Classes?
- Easily add custom HTML outside the main container?
- Customizer options limited to specific user roles?
- Can’t Customize WordPress Page
- WordPress Customizer: Check for value of CSS selector and replace it
- In wordpress customizer api adding div wrap to control
- Apply `the_content’ filter to theme customisation live preview
- retrieve theme custom settings
- Multiple Customizers
- Which IDE best for WordPress Development? [closed]
- Refresh Customize Section (not preview)
- Do i need to use PHP in customizer api?
- Where did I put this one line of css?
- Hover Hide-Visible Additional CSS not working in WordPress website, but shows properly in Customize window
- Multiple Inputs in a Customizer Control
- Embedding a SOAP Client into a WordPress Plugin?
- Remove WordPress theme from a specific page
- How to keep a WordPress site synchronized between two servers?
- difference between esc_attr(), strip_slashes(), strip_tags()?
- Looking to display non-image files in Gallery with logo specific to file type
- How to add default images into theme customizer image control?
- Is it ok to not a have child theme and just create a theme from scratch?
- Widget Javascript code (ajax)
- Why would switch_to_blog stop working?
- $wp_customize->remove_section for customizer setting?
- Modify a theme to insert custom widgets?
- Fatal error: Call to a member function add_rewrite_tag() on a non-object in /wp-includes/taxonomy.php on line 333
- Search a post using the date it was posted
- Change login error messages? Cookie error message
- Allow non-admins to access the Customize theme page
- Query post for ‘selected category’ in archive.php
- Multiple Images/ Slider with custom post [single.php] [closed]
- How do I change the markup only of a built-in widget?
- problem in uploading attachment to custom directory
- Basic Authentication problem with custom API endpoints
- How to update theme from localhost to online site
- Is it necessary to use Timthumb in WordPress 2.9+?
- How to show wp.me shortlink underneath each post?
- Change admin avatar only (without Gravatar or plugin)?
- Query for specific custom field
- Can ‘edit_form_after_editor’ messages be varied for specific pages?
- Custom login and registration forms
- How to customize a site hosted on wordpress.com locally [closed]
- how to add wp-user fields to front-end form
- Show custom field value as a link
- How to remove a settings section from the Theme Customization API preview pane?
- Removing “Failed” query argument upon successful login
- custom email validation using javascript api with elementor pro and code snippets
- Is MultiSite the Correct Solution for a Corporate Site with Searchable Regions?
- New to WP: links on static homepage are not working
- Calling get_theme_mod() of an WP_Customize_Image_Control() returns an Array, how do I correctly return the image src for my custom theme?
- Multiple logo’s in wordpress menu
- If a theme will undergo major changes would it be better to clone the parent instead of writting a child theme?
- Adding separate CSS files for separate pages with functions.php
- after checked the checkbox in backend, dont show social link on frontend
- Add commentmeta custom field to every published comment with SQL
- Post thats in Two Categories, only want to display name for one
- wp_head makes my custom page template not work in Customizer?
- WordPress Search on Multiple wp sites
- How to get value from wp_usermeta table in database?
- How to add filters to my site?
- How to use same username account for multiple users?
- Advanced Custom Fields in WP_Query: Href Returning Empty
- How to increase page title font size in twenty seventeen wordpress theme for static home page and single column option