Site Title/Header for WordPress Blog

I want the title of my blog to appear as one thing while its on the homepage, and something else when it is everywhere else on my blog.

Does this code look right?

Read More
<title>
<?php 
if ( is_home() )
   echo "Blog Title" //When on the homepage
else
   echo ucwords(wp_title('',true)); //Name of blog article
   echo ucwords(get_bloginfo('name')); //Followed by site name
?>
</title>

Any feedback is appreciated.

Related posts

Leave a Reply

2 comments

  1. Only one thing you should pass false in the wp_title function

    echo ucwords(wp_title('',false));

    wp_title function echo the title if the second argument is passed as true, if it is passed false it will return the title for further operations