How To Make A Custom Home Page Title
I’ve received more than a few emails asking me how I got my blog home page to say “Make Money Online with John Chow dot Com” while all my other pages show the default title and blog name.
Normally, Wordpress shows the home page title as name of the blog and the tagline. In my case, it would be John Chow dot Com >> The Miscellaneous Ramblings of a Dot Com Mogul. When I decided to go after the make money online keywords, I changed the title of the home page to add those words in. However, I didn’t want to change my tagline in order to do that. This is where Justin from My PC Rig came in. Justin is a coding genius and showed me how to mod my blog header file to achieve the desired result.
Do I Hear An Echo?
To give your blog home page a custom title that is not tied to your blog name or tagline, you need to insert an echo command. Log into your server and find the header.php file in your blog theme folder. Look for the following codes. This was taken from the Mistylook theme so your header codes maybe a bit different.
<title><?php bloginfo(’name’); ?> <?php if ( is_single() ) { ?> » Blog
Archive <?php } ?> <?php wp_title(); ?></title>
Add the following echo command in front of the code that calls up the title.
<title><? if ($_SERVER["REQUEST_URI"] == "/"){
echo "Make Money Online with John Chow dot Com";
}else{
?>
<title><?php bloginfo(’name’); ?> <?php if ( is_single() ) { ?> » Blog
Archive <?php } ?> <?php wp_title(); ?></title>
If you run the Optimal Title plugin, like I do, then the codes will look like this.
<title><? if ($_SERVER["REQUEST_URI"] == "/"){
echo "Make Money Online with John Chow dot Com";
}else{
?>
<? optimal_title(’«’); ?><?php bloginfo(’name’); ?> <?php if (!optimal_title(”, FALSE)) bloginfo(’description’); ?> <? } ?></title>
What the above change does is tell Wordpress to use the standard name and tagline as the title for every page except the home page. If a reader goes to the home page, it will show whatever you entered in the echo.

- Posted in Wordpress
- 32 comments what's your take?
Sorry, the comment form is closed at this time.
















And do u use optimal title? Add an example with Optimal Title Plugin :p
Reply to this commentSure! Done!
Reply to this commentGreat Stuff John. As you can see on my site, I definitely abused my home page title. And yes, my name is #2 on google. One more to go. Thanks John!
Reply to this commentWell done John. I’m still learning how to modify my template.
Reply to this commentJohn thanks for reading my mind. I have been trying to work with the other tips you put out. I’m out of the comfort zone with the SEO and site design and all the other languages you experts understand! Congratulations on knowing those skills!
Reply to this commentMaybe he has some
scheme behind this. *Joking*
You always confuse me if you are evil or not, soo evil john.
Ok, real point,
Does anyone know anything for wordpress.com blogs?
Reply to this commentGood Chow, thanks for sharing, I was wondering to how you did that.
Reply to this commentThere is an “is_home” variable you can test against instead of testing against the URI… not that it really matters…
Reply to this commentTo add to this, there are a bunch of built in WP functions like this.
is_search() — Search Query
is_page() — Manually added “static” page
is_post() — Normal posts
is_single() — Is there just one item on the page (ie not front/category pages).
I’m sure there are more, but with those you can do some tricky things.
Reply to this commentOh, and I think they are all functions..
so you need to test using
if (is_home()) {
// Do Whatever.
}
You can also do the inverse, notice the bang (!), which basically means NOT.
if (!is_home()) {
Reply to this comment// Do whatever.
}
Very nice. I didn’t even notice it until you post about it lol
Reply to this commentI’ve actually wondered how to do this. I noticed it on your blog as well as a few others. Thanks for the code!
Reply to this commentCan use SEO Title Tag plugin also.. can download it from here.. http://www.netconcepts.com/seo-title-tag-plugin/
Reply to this commentYeah… I’ve just recently installed SEO title plugin aswell. It was broken a month or so ago but now works like a charm. Highly recommended. Hate having to custom hack wordpress
Reply to this commentthanks for the heads up
Reply to this commentIts good, but for one flaw.
You have to rename every post individually!
Reply to this commentGlad you took my advice and made a post about this, now I have the information archived somewhere
Reply to this commentOptimal Title sucks! It’s not compatible with other plugin plus you have to dig around to configure it =(. Check out my post on the “Top WordPress Meta-Tag Plugins List” for the ‘Ultimate Meta-Tags’ plugin (scroll down to the very end
and, yes, this plugin can not only insert the title tag but also pretty much ALL of the meta tags :). Enjoy guy!
Reply to this commentMy bad here’s the URL:
http://theseoblogger.com/seo-blogs/wordpress/wordpress-meta-tag-plugins-list-descriptions-for-wordpress-blog/
Reply to this commentTry this my friend, a recommended way
Reply to this comment<title><?php if(is_home()) {
echo 'Make Money Online with John Chow dot Com';
}
else { ?>
<?php bloginfo(’name’); ?> <?php if ( is_single() ) { ?> » Blog
Archive
*Also, all you need for the title is these code between the title tags:
I explain why this simple structure is the best title config for SEO on my blog. The post, I think, is under the related post entries in the above ‘Top Wordpress Meta-Tag Plugins List’.
O.K. Gtg….
Reply to this commentOk SEO blog, no offense, but those Three posts are actually supposed to be One
Reply to this commentInstead of hard-coding a check on $_SERVER['REQUEST_URI'], you can just use the WordPress function is_home(), i.e.
if (is_home()) {
Reply to this comment// my homepage title goes here
} else {
// my archives/single page title goes here
}
There’s an easier function than
$_SERVER["REQUEST_URI"] == “/”
It’s is_home or is_page(home) or something like that… I’ll have to look it up quickly.
Reply to this commentCould you explain it a little better please?
Reply to this commentWordpress out of the box is extremely bad for supplemental results.You need to add a unique page title and page description to every post. If you can’t make your own plugin which allows you todo this for every post then there are a couple of 1/2 decent plugins that do it automatically. One is called Add-Meta-Tags it isn’t perfect but it is heaps better than the standard fare from wordpress. It also automatically adds unique page titles and page descriptions to all your old posts which can be handy if you have a couple of hundred posts.
Reply to this commentWell then we will have to look into this one. Thanks for sharing.
Reply to this commentOk, anybody here can do a evil trick and create some script for other platforms like Blogger or Xanga?
That will make a great update and greater value for John’s post, and a
linkback with good traffic.
NOW, thats

Reply to this commentThanks for the hack, very useful Wordpress trick.
Reply to this commentSo many people giving advices.
Well… php rocks for wordpress:) If you know just a bit of, you can make a lot.
about $_SERVER: there’s the simple way
is_home, or is_something… it’s on the WP framework:) Why should i look for something (waste time) when it’s so easy to just put it there?:)
Notice: for ones that have their blogs in a subfolder, request_uri should be properly set. For those, is_home it’s the simple way:)
And… i’m using the $_SERVER method to have a my own location for readers.
Reply to this commentnice way around. thanks to Chow & SEO Blog..
Reply to this comment