How to adjust the title for every article in WordPress
Posted by Admin L in WordPress Experience on 10-03-2012.
Author: Nosa Lee
Original Address: https://www.seeksunslowly.com/adjust-wordpress-blog-title
To reprint this article, please indicate the source, thank you.
_____________________________________
The title format may not be to your satisfaction in current WordPress theme, if you want adjust it, please click “Appearance -> Editor -> Header (header.php)” in the control panel, and adjust the content between <title></title>
I use following title code and think it is good, for your reference.
[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]