I want to remove the following items from the customizer menu:
However, I already tried a few codes from other Stack questions but with no luck!
Is it even possible to remove those?
I want to remove the following items from the customizer menu:
However, I already tried a few codes from other Stack questions but with no luck!
Is it even possible to remove those?
Here you go:
$wp_customize->remove_section('colors'); $wp_customize->remove_section('nav_menus'); $wp_customize->remove_section('static_front_page'); EDIT AFTER DISCUSSION
After testing I found that this doesn't work for nav_menus. You have to set a higher priority on the hook, like this:
add_action( 'customize_register', 'remove_nav_menu_section', 20 );
This gives a php warning from WP but otherwise does the job.
<li id="accordion-section-nav_menus" .. > Maybe it is not section but panel. Then you need remove_panel. remove_panel, it doesn't remove it either... the big Wordpress mystery..
remove_controlor theremove_sectioncommand. Inspect the code to find it. In the link that you provide it's well explained.