在函数中输入以下代码。php
function sorcey_customize_register($wp_customize){
$wp_customize->add_section(\'sorcey_footer\', array(
\'title\' => __(\'New Section\', \'text_domain\'),
\'description\' => \'\',
\'priority\' => 120,
));
/* =============================
Text input
===============================*/
$wp_customize->add_setting("sr_copyright", array(
"default" => "",
\'capability\' => \'edit_theme_options\',
"transport" => "postMessage",
));
$wp_customize->add_control(new WP_Customize_Control($wp_customize, "sr_copyright_ctrl",
array(
"label" => __("Title", "text_domain"),
"section" => "sorcey_footer",
"settings" => "sr_copyright",
"type" => "text",
)
));
}
add_action(\'customize_register\', \'sorcey_customize_register\');
然后,chek将有一个“新部分”