Remove The “Home” Link From Your Home Page Now

Posted in Getting Your Feet Wet, How To by DB

One of the 10 most violated Home Page design guidelines according to Jakob Nielson is to include an active link to the homepage from the homepage itself. How often do you see this? All the time I bet. I’m yet to come across a WordPress theme that addresses this flaw. I’m sure it’s out there somewhere. If you do find such a design, let me know.

Is it really important? Can I fix it? Is it difficult to fix? Yes, Yes and No. Why is it important? It sucks from a usability perspective and offers a slight SEO advantage. Why do you want to waste your link juice from what is typically your highest ranked page.

So how do we fix this? This is the easy part. I’m assuming that your home page link is part of your blog header as is the case usually. Simply follow these steps to fix it.

Open your theme header page and look for the snippet of code that lists all the pages. It will look something like this.


<ul>
<li><a href="http://www.mytradedomain.com" >Home</a></li>
<?php wp_list_pages('title_li='); ?>
</ul>

Now replace the above with


< ?php if ( is_home() ) : ?>
<ul>< ?php wp_list_pages('title_li='); ?></ul>
< ?php else : ?>
<ul>
<li><a href="http://www.mytradedomain.com" >Home</a></li>< ?php wp_list_pages('title_li='); ?></ul>
< ?php endif ?>

That’s it, save your theme header.php, refresh your cache and you are good to go. Now bear in mind there will be differences since we are all on different themes but the general principle remains the same. We are simply checking to see if the current page is the home page. If yes, do not display the “Home Page” link. If not, include the “Home Page” link along with the rest of the pages.

You can see how it works by looking at my navigation bar on the top. Let me know if you run into issues

Page copy protected against web site content infringement by Copyscape

One Response

  1. Валерий Says:

    Спасибо

Leave a Comment