答案 0 :(得分:1)
在您的主题中转到 function.php
和像这样的代码
function self_customizer_section($wp_customize) {
$wp_customize->add_section( 'section_name' , array(
'title' => __( 'Self Logo', 'my_theme' ),
'description' => 'theme general options',
));
/* LOGO */
$wp_customize->add_setting( 'self_logo', array(
'default' => get_template_directory_uri().'/images/mytheme.png'
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'self_logo', array(
'label' => __( 'Main Logo', 'my_theme' ),
'section' => 'section_name',
'settings' => 'self_logo',
)));
}
add_action('customize_register', 'self_customizer_section');
有关更多详细信息,您可以按照以下链接,他就该问题制作了精彩的教程
见续。
这是链接