Fixing titles on browser tabs
-
Hi
I’ve been trying to work out how to fix how the titles of my WordPress website and its pages appear on browser tabs.
I came across this old thread:
http://wordpress.org/support/topic/how-to-change-tittle-on-browser-tabIn that thread the advice below is given:
“
<title><?php if(is_front_page()) { echo bloginfo('name'); } else { wp_title(''); } ?></title>That’s your title tag. It displays the blog name when a visitor is on the front page. Otherwise, it displays the page’s title.”
But mine doesn’t look like that.
The only mentions of title in my header.php are in the chunk I’ve copied out below. I’m not sure which bit I need to amend to make the browser tab titles work properly. I have no understanding of the technical wizardry that makes WordPress work, so I’m completely in awe of anyone who can help me sort this out! Thanks in advance for any help anyone can offer me.
<head> <meta name="google-site-verification" content="E1rhjkoazTctq7v8UA8nwUiGLAP0g9SF_inpTduWSTs" /> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width" /> <title><?php wp_title( '|', true, 'right' ); ?></title> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?> <!--[if lt IE 9]> <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script> <![endif]--> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div id="page" class="hfeed site"> <header id="masthead" class="site-header" role="banner"> <hgroup> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> </hgroup>One page of my website is here – http://www.mattreilly.com/contact-me/ – you can see the problem in the browser tab.
The topic ‘Fixing titles on browser tabs’ is closed to new replies.