这是一个创建于 3366 天前的主题,其中的信息可能已经有所发展或是发生改变。
我在 VPS 上搭建了一个博客,但出现了一个问题:
假如把站点标题设置为 ABC ,浏览器就会显示网站的标题(就是页面名称)为 ABCABC (重复了两次),如何解决?
已经确认是主题的问题了,应该是 header.php 的原因。
附上 header.php 内容:
<?php
?><!DOCTYPE html>
<html <?php language_attributes (); ?>>
<head>
<meta charset="<?php bloginfo ( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo ( 'pingback_url' ); ?>">
<?php wp_head (); ?>
</head>
<body <?php body_class (); ?>>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php _e ( 'Skip to content', 'materialwp' ); ?></a>
<header id="masthead" class="site-header" role="banner">
<nav class="navbar navbar-inverse" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" rel="home" href="<?php echo esc_url ( home_url ( '/' ) ); ?>"><?php bloginfo ( 'name' ); ?></a>
</div>
<div class="navbar-collapse collapse" id="bs-example-navbar-collapse-1">
<?php
wp_nav_menu ( array (
'theme_location' => 'primary',
'depth' => 2,
'container' => false,
'menu_class' => 'nav navbar-nav navbar-left',
'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
'walker' => new wp_bootstrap_navwalker ())
);
?>
</div> <!-- .navbar-collapse -->
</div><!-- /.container -->
</nav><!-- .navbar .navbar-default -->
</header><!-- #masthead -->
<div id="content" class="site-content">
求解决,感激不尽!
2 条回复 • 2015-09-05 07:15:06 +08:00
|
|
1
zhanger 2015-09-05 00:54:41 +08:00 via iPad 1
wp_head 里面📡
|
|
|
2
EAimTY 2015-09-05 07:15:06 +08:00
|