WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to hide "Home" link in nav bar (8 posts)

  1. mattzellmer
    Member
    Posted 3 years ago #

    I'm using the Twenty Ten theme and am trying to figure out how to not display the "Home" link in my main nav. I've made my Home page a static page so in my nav bar I currently have: Home, Products, About, and Blog.

    After searching forums I found one solution which involved inserting a line that basically says "do not display page id=2" but as far as I can tell the home page doesn't have an id number. I've also tried a couple of plugins made to exclude specific pages from being displayed but they don't work on the home page.

    I don't want to display "Home" in the main nav or as the page title (at the top of the main content area). How do I do that?

    Thanks.

  2. govpatel
    Member
    Posted 3 years ago #

    Use custom menu feature and just do not add your home page in the menu but if you do want home in menu how would your visitor browse back to your root page.

  3. mattzellmer
    Member
    Posted 3 years ago #

    Thanks govpatel. That worked great. Not sure why the other dozen posts I read didn't mention that. Thanks for the help.

  4. govpatel
    Member
    Posted 3 years ago #

    You are welcome

  5. JoeyPetrone
    Member
    Posted 3 years ago #

    This is for the top nav bar, correct? For some reason this isn't working properly. I made a custom menu and added it to the primary widget, but that only updates the sidebar. Is there more to it?

  6. santosh.sahoo
    Member
    Posted 3 years ago #

    go to functions.php of twentyten theme

    and find the following code

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

    and replace it with

    function twentyten_page_menu_args( $args ) {
    	$args['show_home'] = false;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' );
  7. JoeyPetrone
    Member
    Posted 3 years ago #

    I have tried that and it does nothing, i guess in theory it should of worked. Maybe my issue is more of a special circumstance.

    http://winbornlandscape.com/

  8. govpatel
    Member
    Posted 3 years ago #

    @JoeyPetrone did you create a menu that you to add in primary location and add the pages to it.

Topic Closed

This topic has been closed to new replies.

About this Topic