admin管理员组文章数量:1122832
I'm trying to use my custom logo, uploaded from Appearance > Header. But none of the parameters I have set in my_custom_logo_setup are working.
In functions.php
//Add custom logo
function my_custom_logo_setup() {
$defaults = array(
'height' => 100, //not working!
'width' => 100, //not working!
'flex-height' => true, //not working!
'flex-width' => true, //not working!
'header-text' => array( 'site-title', 'site-description' ), //not working!
'unlink-homepage-logo' => true, //not working!
);
add_theme_support( 'custom-logo', $defaults );
}
add_action( 'after_setup_theme', 'my_custom_logo_setup' );
In header.php:
<header id="masthead" class="site-header site-title site-description">
<div class="site-branding">
<?php if ( function_exists( 'my_custom_logo_setup' ) ) {
the_custom_logo();
} ?>
<h1 class="site-title">Titulo</a></h1>
<p class="site-description">Description</a></p>
</div>
<!-- .site-branding -->
<!-- <nav id="site-navigation" class="main-navigation">
</nav> -->
<!-- #site-navigation -->
</header><!-- #masthead -->
本文标签: customizationCustom Logo why parameters are not working at all
版权声明:本文标题:customization - Custom Logo: why parameters are not working at all? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736299431a1930452.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论