Remove the widgets tab from theme customizer

In some of our sites, I would like the site admins to customize the widgets only on the widget page, and not in the Theme Customizer.

How can I remove the widget tab from there?

1 Answer
1

you can create function for theme customizer with all the settings you need:

to remove “widgets” we will need to remove the “widgets” panel.

put this code in function.php

function your_customizer( $wp_customize ) {
$wp_customize->remove_panel( 'widgets' );
}
add_action( 'customize_register', 'your_customizer' );

or if you have your own function just add:

$wp_customize->remove_panel( 'widgets' );

Leave a Comment