The most recent Underscores theme seems to post the Page Title first then the Site Title afterwards. How can I change this to have the Site Title first?
问问题
647 次
1 回答
1
打开你的header.php主题文件
添加:
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
您可以删除»
以下内容:»(由您决定)
Underscores 主题使用 add_theme_support() 来支持 wordpress 4.1 版中引入的标题标签,并且它们也在functions.php中提到
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
于 2015-02-07T07:58:28.797 回答