如何调整 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”]
<br /> <?php /* * Print the <title> tag based on what is being viewed.<br /> */<br /> global $page, $paged;</p> <p>wp_title( ‘|’, true, ‘right’ );</p> <p>// Add the blog name.<br /> bloginfo( ‘name’ );</p> <p>// Add the blog description for the home/front page.<br /> $site_description = get_bloginfo( ‘description’, ‘display’ );<br /> if ( $site_description && ( is_home() || is_front_page() ) )<br /> echo ” | $site_description”;</p> <p>// Add a page number if necessary:<br /> if ( $paged >= 2 || $page >= 2 )<br /> echo ‘ | ‘ . sprintf( __( ‘Page %s’, ‘twentyeleven’ ), max( $paged, $page ) );</p> <p>?><br />
[/cc]

【赞赏 / Reward】

微信         支付宝         PayPal

Post a comment