Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Show Home Page Link in WordPress 3.0 Menu

Last updated on by
Elegant Themes
How to Show Home Page Link in WordPress 3.0 Menu

When WordPress 3.0 was launched, many people did not know about how to add a home page link in the WordPress 3.0 Menu. The simple solution was to add home-page link as a Custom Link to the menu. Well in this article, we will show you how you can show home page link under the pages widget in WordPress 3.0 menu system. This is something that all theme developers should have in their WordPress 3.0 compatible themes.

First open your theme’s functions.php file and paste the following code:

function home_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'home_page_menu_args' );

Once you have pasted this code, It should add “Home” as an option under the “Pages” widget on the Menu management page so the user can simply check it off as an item to add to their custom menu.

How to Show Home Page Link in WordPress 3.0 Menu


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • Adox

    What about using an image instead of Home label?

  • jerome kay

    dude you are the real deal.
    my head was spinning but you just saved me
    you are superman.
    thanks

  • Tomy Alma Arif

    Thank you, very usefull :)

  • Milan

    How can i say thanks ?
    It saved my time and also added homepage to menubar with home icon !
    Thanks a lot wpbeginner !

  • jlink

    Thanks a lot !

    However, I have a question, I would like to change “Home” in “HOME” ? What should I do ?

    PS: I’m french, and instead of “home”, it appears “Accueil”, it’s a good thing for me, but why ?

    • http://www.wpbeginner.com/ WPBeginner Support

      You can click on the Home menu in Appearance -> Menus and edit the menu label.

  • Imran

    Thanks a million times buddy. It helped me lot.

  • Ben Power

    Just as I was about to throw my laptop out the window because of the annoyance caused by nearly everything on wordpress I find an easy to follow tip that actually works. Thanks.

  • MJ

    This worked perfectly for Elbee Elgee theme. Thanks! I can’t believe it’s not a default on most of these themes. Clicking on the header or banner used to default back to home as well, but that doesn’t seem to be the norm as far as I can tell.

  • zenny

    Thanks man great piece of work really helpful

  • raedina

    Thank you for posting! Everything else I read was way to complicated at my level.

  • Aleksandar Dunchev

    Thanks a lot! Work great form me!

  • Fredde-Fisk

    Is wordpress realy this retarded? Do I have to add some hack in the core files to get a menu link to the main page? What will happen when I update wordpress to a newer version? It will certainly overwrite functions.php, and my menu item is gone.

    Since WP does not seem to think that you should be able to have a menu item to your main page if it happens to be your “recent posts page”, I started to look for a plugin that solved this in a more permanent way than hacking some php files. But I could not find any. Is there really no good way to solve such a trivial thing?

    • http://www.wpbeginner.com Editorial Staff

      You are NOT hacking the core. You are adding this code to your theme’s functions.php file.

  • Neiljun Odiaz

    You save my page :))

    Thanks!

  • Prashant Ghai

    Thanks a lot. This was exactly what I was looking for.

  • Bogdan

    Useful and working ..

    Thx.

  • Daniel

    Thanks a lot, this was exactly what I need :)

  • Nicole Bencomo

    Can I say “THANK YOU SO MUCH”!!! This was exactly what I was looking for. Fixed my website’s main nav perfectly.

    I love WPBeginner!

  • Meng

    Thank you for helping!!!! It’s really awesome.

    However, if I want to set the URL of default home as
    How can I do that?

    Any response will be greatly appreciate.

    • http://www.wpbeginner.com Editorial Staff

      You can just create a new custom menu item and change the URL there.

  • Joseph

    Thank you so much for this handy tip! It worked a charm first time!

  • Jeannie

    GENIUS!

    Thank you so much – I just spent about 4 hours trying to figure out a simple solution to this. There are many attempts out there but none actually seem to work (at least not on my Barebones installation).

    This is so simple and perfect :D Thanks again!

  • Alec

    I love you man. Thank you so much

  • http://www.sureshchaudhary.wordpress.com/ SureshK.Chaudhary

    which is the best wordpress version???

  • fatemusiclive

    ok ive found it so ignore the comment below, but it doesnt seem to work :S help! lol

    • wpbeginner

      @fatemusiclive If you are using WordPress.com then you won’t have that file available.

  • fatemusiclive

    i dont seem to have a function.php file under themes editor (unless its somewhere else and ive got it wrong and u can direct me lol) can i just add it into the style sheet?

  • staytrue106

    Thank you so much for posting this. I added the homepage before on another wordpress site I had created, but couldn’t remember how I did it (it was also an earlier version of wordpress too). Your post worked perfectly! thank you :-)

  • sarahkovac

    SOOO glad I found this! I had no idea what I was doing and you made it so simple. THANK YOU!

  • thiago.trr.kta

    just FANTASTIC man! you saved me lots of time! thank you very much!

    • http://www.wpbeginner.com Editorial Staff

      Glad we were able to help.

  • josh

    Thank you – this worked great.

    However … now I want to *remove* it as an option (ie back to no ‘Home’ option) but it won’t go away. I tried the following …
    1) removed the code from functions.php
    2) changed $args['show_home'] = true; to $args['show_home'] = false;
    3) hard-refreshed the browser on the admin Menus page
    4) logged out/in of wp-admin
    5) copied the original functions.php back from twentyten
    … but it’s still listed under “View All”

    Any suggestions?

  • http://www.technostarry.com Saqib

    Good trick. Or one can also insert a custom link by typing website.com and then there you go :) But clients who don’t understand all this, will find this trick helpful.

    • http://www.wpbeginner.com Editorial Staff

      Yes, this generates the home page link and it is dynamic.

  • http://sacredspiraldance.com Diana

    Does the home page link work in Wp 3.1.1?

    • http://www.wpbeginner.com Editorial Staff

      Yes… it should work fine.

  • http://www.angelfish-it.co.uk Mark Quinn

    Thanks. Work great!

    Somebody mentioned about if sites URL changes. I use a solitary / when linking to my home page. Don’t know if this good practice but it works.

  • Erin

    This is great – thank you.

    What happens though if the site is in development and the URL of the site changes? Will the “Home” link be automatically updated?

    Is there a way to embed a shortcode into the menu item so that the home URL will always be current?

    • http://www.wpbeginner.com Editorial Staff

      The home url value is coming from your Settings that you have set. If you change that URL, then yes it will change. You can set a custom class for home by clicking edit on the home link in the menu.

  • Sheila

    It looked simple to do, but no matter where I put that code in the theme’s function.php file, it doesn’t work.

    Any clues as to why that might be?

    • http://www.wpbeginner.com Editorial Staff

      Are you clicking on the View All tab? This code is working on a lot of our client’s sites.

      • http://www.your-words-worth.com Phila

        Hi,
        You still haven’t answered Sheila’s question – where in the Functions.php file do we place this code?
        Thanks!

        Sheila says:
        November 11, 2010 at 11:44 am
        It looked simple to do, but no matter where I put that code in the theme’s function.php file, it doesn’t work.

        Any clues as to why that might be?
        Reply

        *
        Editorial Staff says:
        November 12, 2010 at 4:54 pm

        Are you clicking on the View All tab? This code is working on a lot of our client’s sites.

        • http://www.wpbeginner.com Editorial Staff

          You place this code within the php tag anywhere in the functions.php file.

  • http://connorcrosby.me Connor Crosby

    Awesome, thank you so much! I was looking all over for the solution!

  • http://www.dharne.com/blog/ Nathan Williams

    Thank you wpbeginner. Details like these make us more comfortable working with WordPress.

  • http://www.nikitchens.com Joseph

    neat and easy peasey

  • http://www.devilsduke.com Kishore Mylavarapu

    Nice and simple trick.thank you

  • http://www.thevictory.nl/tafeltennis/ Bjorn van der Neut

    I love love love the articles on wpbeginner.com
    Keep them coming…now I only have to switch my own website from .net to wordpress.

    But for that to happen I have to build first my own plugin to submit table tennis scores.

    • http://www.wpbeginner.com Editorial Staff

      Shouldn’t be hard to build that plugin ;) Let us know once you make the plugin :)