我正在从头开始制作一个主题WordPress,但我如何在WordPress的自定义主题部分的左侧添加或构建页脚部分?
我们的想法是添加页脚部分并为页脚创建一个自定义徽标,但我无法在function.php
中配置它。
代码:
function my_customize_register($wp_customize)
{
$wp_customize->add_panel('mypanel', [
'title' => __('My awesome panel', 'domain'),
'description' => __(
"This is the description which doesn't want to show up :(",
'domain'
),
'capability' => 'edit_theme_options',
'priority' => 2,
]);
$wp_customize->add_section('mysection', [
'title' => __('My even more awesome section', 'domain'),
'panel' => 'mypanel',
'description' => __('Section description which does show up', 'domain'),
]);
$wp_customize->add_setting('logo', [
'capability' => 'edit_theme_options',
'default' => '',
'sanitize_callback' => 'ic_sanitize_image',
]);
$wp_customize->add_control(
new WP_Customize_Image_Control($wp_customize, 'logo', [
'label' => __('Logo', 'text-domain'),
'section' => 'general',
'settings' => 'logo',
])
);
}
add_action('customize_register', 'my_customize_register');
1条答案
按热度按时间2w3kk1z51#
注册Wp定制器。
在您想要的位置显示页脚徽标。