您可以创建面板,并在这些面板中放置剖面。
因此,如果您有面板:
$wp_customize->add_panel( \'panel_id\', array(
\'priority\' => 10,
\'capability\' => \'edit_theme_options\',
\'theme_supports\' => \'\',
\'title\' => __(\'Theme Options\', \'mytheme\'),
\'description\' => __(\'Several settings pertaining my theme\', \'mytheme\'),
) );
然后,您需要添加分区:
$wp_customize->add_section( \'header_settings\', array(
\'priority\' => 10,
\'capability\' => \'edit_theme_options\',
\'theme_supports\' => \'\',
\'title\' => __(\'Header Settings\', \'mytheme\'),
\'description\' => __(\'Header elements configuration\', \'mytheme\'),
\'panel\' => \'panel_id\',
) );
$wp_customize->add_section( \'footer_settings\', array(
\'priority\' => 10,
\'capability\' => \'edit_theme_options\',
\'theme_supports\' => \'\',
\'title\' => __(\'Footer Settings\', \'mytheme\'),
\'description\' => __(\'Footer elements configuration\', \'mytheme\'),
\'panel\' => \'panel_id\',
) );
常规截面为“子”面板。然后将设置添加到分区中,就完成了。