EAimTY
V2EX  ›  WordPress

大神们好,我来请教一个关于页面名称的问题

  •  
  •   EAimTY · Sep 4, 2015 · 3078 views
    This topic created in 3926 days ago, the information mentioned may be changed or developed.
    我在 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 replies    2015-09-05 07:15:06 +08:00
    zhanger
        1
    zhanger  
       Sep 5, 2015 via iPad   ❤️ 1
    wp_head 里面📡
    EAimTY
        2
    EAimTY  
    OP
       Sep 5, 2015
    @zhanger 你好,请问应该怎么修改?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1116 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 18:21 · PVG 02:21 · LAX 11:21 · JFK 14:21
    ♥ Do have faith in what you're doing.