WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] How to Hide 'Home' from TwentyTen menu? (18 posts)

  1. aero313
    Member
    Posted 3 years ago #

    hi all,

    I need to remove (or at the very least, change the style of) the "Home" link on my site, which uses the TwentyTen theme, and I can't do it. I've been able to hide other menu items with no problem, but not this one.

    I keep finding blog posts where people say there is no Home link for this theme, but I'm having the opposite problem!

    please help!

  2. chinmoy
    Member
    Posted 3 years ago #

    goto line no 273 in functions.php file and modify the line
    $args['show_home'] = false;

  3. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Site url?

  4. aero313
    Member
    Posted 3 years ago #

    thanks chinmoy... is that line 273 in the functions.php file? when I tried that, it broke the site. I get the error:
    Fatal error: Call to undefined function add_action() in /data/23/2/4/0/2167815/user/2379276/htdocs/POL/wp-includes/functions.php on line 51

    I reinstalled wordpress at
    http://03145e2.netsolhost.com/PLight/

  5. chinmoy
    Member
    Posted 3 years ago #

    can you see this line $args['show_home'] = true;

    replace true to false. not delete the function.

    Why it broke the site? I surprise:)

  6. aero313
    Member
    Posted 3 years ago #

    hmm. I tried it again and it seems to have worked now. Thanks!

  7. chinmoy
    Member
    Posted 3 years ago #

    mark it as resolve

  8. iTrinli
    Member
    Posted 3 years ago #

    Thank you so much ;)

  9. dudenas
    Member
    Posted 3 years ago #

    Thank you.
    Imho it`s a bug.
    User shouldn`t modify functions.php to get a menu listing he wants.

  10. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    @cloo

    live is a bug; user shouldn't need to read to learn.

    what next?

    how many tick boxes, dropdown menues, options, etc do you want in a theme?

    is editing index.php ok?
    why not then editing functions.php?

    there is also the 'menus' in 'appearance' which leades to the wp_nav_menu option page where you can build your own menu without editing the functions.php

  11. MedTeam
    Member
    Posted 3 years ago #

    Thanks for this info. It's on line 215 in my version. Works like a charm. I prefer not wasting extra time building a custom menu when page order already works, if I don't have to. Just another thing to fuss with, IMO.

  12. tonyzeoli
    Member
    Posted 3 years ago #

    Anyone know where you can change the "Home" text from "Home" to "home". If I want it lower case, how do I do that?

  13. AITpro
    Member
    Posted 3 years ago #

    You would change the Home text to lowercase with the CSS text-transform Property in your Theme's style.css file.

    The TwentyTen WordPress Theme does not contain this CSS code so you will have to add this yourself to the style.css file.

    div.menu ul li a {text-transform:lowercase}

    This is specifically for the TwentyTen WordPress Theme. If you are using a different Theme then the div name and or class name may be different. Also this changes all of your menu titles to lowercase.

  14. BasseNXT
    Member
    Posted 3 years ago #

    Hi,

    I would like to change "Home" to "Hem" because of my location (Sweden). Is that possible?

  15. kubapigora
    Member
    Posted 3 years ago #

    Same question here. I would like to translate "HOME" link in navbar to polish. I would appreciate any help. Thanks!

  16. AITpro
    Member
    Posted 3 years ago #

    You can just change show home from true to false then create your own page called whatever you want in your own language. The code you need to modify is located in the TwentyTen Theme's functions.php file. change the $args['show_home'] = true; to $args['show_home'] = false;

    /**
     * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
     *
     * To override this in a child theme, remove the filter and optionally add
     * your own function tied to the wp_page_menu_args filter hook.
     *
     * @since Twenty Ten 1.0
     */
    function twentyten_page_menu_args( $args ) {
    	$args['show_home'] = true;
    	return $args;
    }
  17. hcgwebsite
    Member
    Posted 3 years ago #

    What would the line of text be in the Theme Adventure-journal? I'm having the same issue with HOME appearing above the text in my page at http://www.HeritageConsultingGroup.com

    thanks

  18. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    @hcgwebsite

    please start a new thread as your theme is not related.

Topic Closed

This topic has been closed to new replies.

About this Topic