wordpress所有页面中的徽标
Logo in all pages in wordpress
我是 wordpress 的新手,我已经使用 it.All 主页上的博客创建了博客 page.I 还在主页上上传了徽标,它只在主页上可见,所以当用户点击在任何特定博客上都看不到徽标。
<div class="logo">
<?php if ( get_theme_mod('himalayas_logo', '') != '') { ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php theme_logo(); ?></a>
<?php } ?>
<?php if (function_exists('the_custom_logo') && has_custom_logo( $blog_id = 0 )) {
himalayas_the_custom_logo();
} ?>
</div>
删除检查选项值的条件现在代码将是:
<div class="logo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo.png" alt="" />
</a>
</div>
终于得到答案
将所有代码还原为原始修改代码只需转到
Appreance->Theme->customize->Himalayas Header Options->Header Title/Tagline and Logo->select option "Header Logo Only"
就是这样
我是 wordpress 的新手,我已经使用 it.All 主页上的博客创建了博客 page.I 还在主页上上传了徽标,它只在主页上可见,所以当用户点击在任何特定博客上都看不到徽标。
<div class="logo">
<?php if ( get_theme_mod('himalayas_logo', '') != '') { ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php theme_logo(); ?></a>
<?php } ?>
<?php if (function_exists('the_custom_logo') && has_custom_logo( $blog_id = 0 )) {
himalayas_the_custom_logo();
} ?>
</div>
删除检查选项值的条件现在代码将是:
<div class="logo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo.png" alt="" />
</a>
</div>
终于得到答案
将所有代码还原为原始修改代码只需转到
Appreance->Theme->customize->Himalayas Header Options->Header Title/Tagline and Logo->select option "Header Logo Only"
就是这样