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?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityIn 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?
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' );