Answer the question
In order to leave comments, you need to log in
How to remove unnecessary settings in the WordPress customizer?
When opening the customizer in WP, there are a lot of unnecessary menus on the left, such as "Header Images", "Additional Styles", "Colors".
I understand that sometimes these settings are needed, but for my theme they are completely unnecessary. Can I somehow remove them?
ps I'm
using the _s start pattern
Answer the question
In order to leave comments, you need to log in
Try something like this:
function mytheme_customize_register( $wp_customize ) {
$wp_customize->remove_section( 'title_tagline');
$wp_customize->remove_section( 'colors');
$wp_customize->remove_section( 'header_image');
$wp_customize->remove_section( 'background_image');
$wp_customize->remove_panel( 'nav_menus');
$wp_customize->remove_section( 'static_front_page');
$wp_customize->remove_section( 'custom_css');
}
add_action( 'customize_register', 'mytheme_customize_register', 99 );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question