Sorry for this question, but I can't work out why my site name isn't showing in the browser window even though I have wp_title()
in the <head>
.
All I have done is used CSS to indent the text -9999px so it's off the screen but I thought that would still register as the title in the browser?
When I navigate through to posts, the post name appears, but the site name doesn't appear on those pages either, even though it should appear before the post.
I'm stumped. Any help would be greatly appreciated!
Thanks in advance!
Following on from Will's advice I included the following code in the functions.php
:
function twentytwelve_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() )
return $title;
// Add the site name.
$title .= get_bloginfo( 'name' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
$title = "$title $sep $site_description";
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'twentytwelve_wp_title', 10, 2 );
and then changed the <title>
tag to the following:
<title><?php wp_title('|', true, 'right'); ?></title>
All seems to be working now! Thanks for your help!