John Chow once said "online video is the next big thing".Earn $12,000 every month uploading videos!
 




Get Reviewed by this Blog for only $500
DealDotComTTZ MediaPerformancing Ads
Pepperjam NetworkBidvertiser
Text Link AdsKonterra

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() ) { ?> &raquo; 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() ) { ?> &raquo; 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(’&laquo;’); ?><?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.

Find out what I am doing right now by following me on Twitter! If you like this post then please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox.

1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 2.75 out of 5)
Loading ... Loading ...

Here's A Few More Related Posts

  • All in One SEO Pack for Wordpress
  • Two Tweaks To Generate More Blog Traffic
  • On-Page Keyword Optimization for Content Sites
  • Make Money with Dirt Cheap Landing Pages
  • Make Money Online - Review My Blog Rule Change

    RSS feed | Trackback URI

    32 Comments »

    Comment by Alex
    2007-05-31 18:19:29
    MyAvatars 0.2

    And do u use optimal title? Add an example with Optimal Title Plugin :p

    Comment by John Chow
    2007-05-31 18:36:00
    MyAvatars 0.2

    Sure! Done!

    Comment by AndyDang
    2007-05-31 18:45:33
    MyAvatars 0.2

    Great 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!

     
    2007-05-31 19:31:15
    MyAvatars 0.2

    Well done John. I’m still learning how to modify my template.

     
    Comment by Success Online
    2007-05-31 20:12:54
    MyAvatars 0.2

    John 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!

    Comment by Ankur
    2007-06-01 08:00:51
    MyAvatars 0.2

    Maybe he has some :twisted: 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?

    (Comments wont nest below this level)
     
     
    Comment by Nomar
    2007-06-01 00:50:03
    MyAvatars 0.2

    Good Chow, thanks for sharing, I was wondering to how you did that.

     
     
    Comment by Jez
    2007-06-01 08:11:18
    MyAvatars 0.2

    There is an “is_home” variable you can test against instead of testing against the URI… not that it really matters…

    Comment by Eric
    2007-06-01 21:17:17
    MyAvatars 0.2

    To 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.

     
    Comment by Eric
    2007-06-01 21:18:52
    MyAvatars 0.2

    Oh, 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()) {
    // Do whatever.
    }

     
     
     
    Comment by Steven
    2007-05-31 18:43:36
    MyAvatars 0.2

    Very nice. I didn’t even notice it until you post about it lol

     
    Comment by Daniel
    2007-05-31 19:04:20
    MyAvatars 0.2

    I’ve actually wondered how to do this. I noticed it on your blog as well as a few others. Thanks for the code!

     
    Comment by cikgu azleen
    2007-05-31 19:26:36
    MyAvatars 0.2

    Can use SEO Title Tag plugin also.. can download it from here.. http://www.netconcepts.com/seo-title-tag-plugin/

    Comment by Brilliances
    2007-06-01 04:57:22
    MyAvatars 0.2

    Yeah… 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

    Comment by Wahlau.NET
    2007-06-01 18:55:57
    MyAvatars 0.2

    thanks for the heads up

     
     
    Comment by Ankur
    2007-06-01 08:03:26
    MyAvatars 0.2

    Its good, but for one flaw.

    :arrow: You have to rename every post individually!

     
     
    Comment by Dave
    2007-05-31 19:35:12
    MyAvatars 0.2

    Glad you took my advice and made a post about this, now I have the information archived somewhere :)

     
    Comment by SEO Blog
    2007-05-31 20:16:22
    MyAvatars 0.2

    Optimal 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 :roll: and, yes, this plugin can not only insert the title tag but also pretty much ALL of the meta tags :). Enjoy guy!

     
     
    Comment by Vivek
    2007-05-31 20:18:26
    MyAvatars 0.2

    Try this my friend, a recommended way

    <title>
    <?php if(is_home()) {
    echo 'Make Money Online with John Chow dot Com';
    }
    else { ?>
    <?php bloginfo(’name’); ?> <?php if ( is_single() ) { ?> » Blog
    Archive

     
    Comment by SEO Blog
    2007-05-31 20:29:18
    MyAvatars 0.2

    *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….

    Comment by Ankur
    2007-06-01 07:55:40
    MyAvatars 0.2

    Ok SEO blog, no offense, but those Three posts are actually supposed to be One :?:

     
     
    Comment by Scott Yang
    2007-05-31 20:46:48
    MyAvatars 0.2

    Instead of hard-coding a check on $_SERVER['REQUEST_URI'], you can just use the WordPress function is_home(), i.e.

    if (is_home()) {
    // my homepage title goes here
    } else {
    // my archives/single page title goes here
    }

     
    Comment by Jeff Kee
    2007-06-01 02:26:06
    MyAvatars 0.2

    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.

    Comment by Ankur
    2007-06-01 08:07:00
    MyAvatars 0.2

    Could you explain it a little better please?

     
     
    Comment by
    2007-06-01 07:53:04
    MyAvatars 0.2

    Wordpress 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.

    Comment by Success Online
    2007-06-01 07:56:01
    MyAvatars 0.2

    Well then we will have to look into this one. Thanks for sharing. :cool:

     
     
    Comment by Ankur
    2007-06-01 07:57:59
    MyAvatars 0.2

    Ok, 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 :twisted: linkback with good traffic.

    NOW, thats :idea: :arrow: :twisted: :arrow: :twisted:

     
    2007-06-01 19:41:42
    MyAvatars 0.2

    Thanks for the hack, very useful Wordpress trick.

     
    Comment by Lejer
    2007-06-03 11:21:01
    MyAvatars 0.2

    So 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.

     
    Comment by a.erol
    2007-06-04 06:34:54
    MyAvatars 0.2

    nice way around. thanks to Chow & SEO Blog..

     
    2007-06-06 07:22:17
    MyAvatars 0.2

    [...] Chow wrote an article on how to make a custom Home Page title. After reading the comments I am not convinced using [...]

     
    Name (required)
    E-mail (required - never shown publicly)
    URI
    Your Comment (smaller size | larger size)
    You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.