admin管理员组文章数量:1435859
In the customizer, the site identity section is missing a logo upload field. Adding such field is not a big deal: A field can be added, but I don't know the section name that is created in the core of the WordPress. Can someone help me in that?
The field can be created like this:
$fields[] = array(
'type' => 'color',
'setting' => 'links_color',
'label' => __( 'Links Color', 'twentytwelve' ),
'section' => 'header',
'default' => '#00A2E8',
'priority' => 10,
'output' => array(
'element' => 'body #page a, body #page a:link, body #page a:visited, body #page a:hover',
'property' => 'color',
)
);
The below is a section for the header:
'section' => 'header',
I want to know the section name of the site identity so that the logo option can be added there.
In the customizer, the site identity section is missing a logo upload field. Adding such field is not a big deal: A field can be added, but I don't know the section name that is created in the core of the WordPress. Can someone help me in that?
The field can be created like this:
$fields[] = array(
'type' => 'color',
'setting' => 'links_color',
'label' => __( 'Links Color', 'twentytwelve' ),
'section' => 'header',
'default' => '#00A2E8',
'priority' => 10,
'output' => array(
'element' => 'body #page a, body #page a:link, body #page a:visited, body #page a:hover',
'property' => 'color',
)
);
The below is a section for the header:
'section' => 'header',
I want to know the section name of the site identity so that the logo option can be added there.
Share Improve this question asked Sep 17, 2017 at 19:51 WordCentWordCent 1,8916 gold badges34 silver badges60 bronze badges2 Answers
Reset to default 6The “Site Identity” section has the ID of title_tagline
for historical reasons.
If you want to see the IDs for the core sections, all you have to do is look at the source for WP_Customize_Manager::register_controls()
. Alternatively, you can get a list of all the sections registered, whether by core or by plugins, by opening your console and entering: _.keys( wp.customize.settings.sections )
.
For anyone in the future searching for the already defined section name, have a look at this official link from wordpress documentation.
本文标签: theme customizersite identity section name
版权声明:本文标题:theme customizer - site identity section name? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744530998a2611033.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论