$wp_Customize->针对定制器设置的Remove_Section? 时间:2015-09-22 作者:benoît 我使用underscores 主题并尝试删除导航菜单,但没有任何结果: $wp_customize->remove_section(\'colors\'); // works $wp_customize->remove_section(\'background_image\'); // ok $wp_customize->remove_section(\'header_image\'); // ok $wp_customize->remove_section(\'static_front_page\'); // ok $wp_customize->remove_panel(\'widgets\'); // ok $wp_customize->remove_panel(\'menu_navs\'); // not ok $wp_customize->remove_section(\'menu_navs\'); // not ok 怎么了? 1 个回复 最合适的回答,由SO网友:WordPress Mike 整理而成 假设您正在尝试删除默认值nav_menus 面板,您的id错误。此外,您还需要在customize_register 胡克,假设你在用那个胡克。function remove_customizer_settings( $wp_customize ){ $wp_customize->remove_panel(\'nav_menus\'); } add_action( \'customize_register\', \'remove_customizer_settings\', 20 ); 文章导航