panels() as $panel_id => $panel ) { $wp_customize->remove_panel( $panel_id ); } $allowed_sections = [ 'title_tagline' ]; foreach ( $wp_customize->sections() as $section_id => $section ) { if ( ! in_array( $section_id, $allowed_sections, true ) ) { $wp_customize->remove_section( $section_id ); } } $allowed_controls = [ 'blogname', 'site_icon' ]; foreach ( $wp_customize->controls() as $control_id => $section ) { if ( ! in_array( $control_id, $allowed_controls, true ) ) { $wp_customize->remove_control( $control_id ); } } } add_action( 'customize_register', __NAMESPACE__ . '\customize_register', 100 );