如何调整 WordPress 博客每页标题
Posted by Admin L in WordPress Experience on 10-03-2012.
作者:牧山道人
原文地址:https://www.seeksunslowly.com/adjust-wordpress-blog-title-sc
转载请注明出处,谢谢。
_____________________________________
有些 WordPress 模板的标题可能并不让你称心,需要调整请在后台点击“Appearance -> Editor -> Header (header.php)”,调整<title></title>间的内容即可。
以下是本道使用的标题代码,请参考:
[cc lang=”php”]
tag based on what is being viewed.
*/
global $page, $paged;
wp_title( ‘|’, true, ‘right’ );
// Add the blog name.
bloginfo( ‘name’ );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( ‘description’, ‘display’ );
if ( $site_description && ( is_home() || is_front_page() ) )
echo ” | $site_description”;
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ‘ | ‘ . sprintf( __( ‘Page %s’, ‘twentyeleven’ ), max( $paged, $page ) );
?>
[/cc]