我如何更改 - (endash)到| (垂直条)在我的浏览器中?

时间:2017-07-16 18:28:45

标签: php html css wordpress browser

在我网站的浏览器标签信息中,我想用垂直线替换短划线。

因此,不是站点名称 - 站点标语,而是站点名称|网站标语。它也类似于类别页面,例如现在它是站点名称 - 站点类别,但我想要站点名称|网站分类。我正在使用Goodlife主题,但我在下面添加了header.php。有谁知道我怎么能改变这个?

的header.php

<!doctype html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=1">
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
	<?php wp_site_icon(); ?>
	<?php 
		$header_style = ot_get_option('header_style', 'style1');
		$general_boxed = (ot_get_option('general_boxed') == 'on' ? 'boxed' : '');
	?>
	<?php 
		/* Always have wp_head() just before the closing </head>
		 * tag of your theme, or you will break many plugins, which
		 * generally use this hook to add elements to <head> such
		 * as styles, scripts, and meta tags.
		 */
		wp_head(); 
	?>
</head>
<body <?php body_class(); ?>>
<div id="wrapper" class="open">
	
	<!-- Start Mobile Menu -->
	<?php do_action( 'thb_mobile_menu' ); ?>
	<!-- End Mobile Menu -->
	
	<!-- Start Content Container -->
	<section id="content-container">
		<!-- Start Content Click Capture -->
		<div class="click-capture"></div>
		<!-- End Content Click Capture -->
		<?php
			get_template_part( 'inc/header/fixed' );
			get_template_part( 'inc/header/subheader' );
			get_template_part( 'inc/header/'.$header_style );
			get_template_part( 'inc/header/pageskin' );
		?>
		
		<div role="main" class="<?php echo esc_attr($general_boxed); ?>">

1 个答案:

答案 0 :(得分:1)

根据this文章,您需要在 functions.php 中添加以下代码:

function wploop_change_separator()
{
return '|';
}
add_filter('document_title_separator', 'wploop_change_separator');
相关问题