我发现WP\\u Customize\\u Manager类有一个名为remove_section(). 在连接到的函数中customize_register 您只需执行以下操作:
$wp_customize->remove_section(\'nav\');
$wp_customize->remove_section(\'static_front_page\');
如果您检查该节的手风琴标题栏,可以找到该节的ID(即“nav”)。查看包含
<li> 标记,它是字符串后面的部分
"customize-section-". 一、 E.:
<li id="customize-section-static_front_page" class="control-section customize-section">
--ID为
"static_front_page"