我正在尝试将徽标上传到网站的标题而不是简单的标题。我正在使用的主题是Yoko(有一些变化),我尝试过任何方式,但由于某种原因它不起作用......
这是标题的子主题代码:
<?php
/**
* @package WordPress
* @subpackage Yoko
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="clearfix">
<header id="branding">
<nav id="mainnav" class="clearfix">
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- end mainnav -->
<?php global $yoko_options;
$yoko_settings = get_option( 'yoko_options', $yoko_options ); ?>
<hgroup id="site-title">
<?php if( $yoko_settings['custom_logo'] ) : ?>
<a href="<?php echo home_url( '/' ); ?>" on class="logo"><img src="<?php echo $yoko_settings['custom_logo']; ?>" alt="<?php bloginfo('name'); ?>" /></a>
<?php else : ?>
<h1><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">hook<span>ii</span><?php
/* bloginfo( 'name' ); */
?></a></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php endif; ?>
</hgroup><!-- end site-title -->
<div class="clear"></div>
<nav id="subnav">
<?php
if (is_nav_menu( 'Sub Menu' ) ) {
wp_nav_menu( array('menu' => 'Sub Menu' ));} ?>
</nav><!-- end subnav -->
</header><!-- end header -->
</header><!-- end header -->
我也尝试过用img标签代替。