WordPress.org

Ready to get started?Download WordPress

Forums

Change nav text 'HOME' to smth else & dissallow to appear at homepage (4 posts)

  1. jdran
    Member
    Posted 1 year ago #

    I am using the TwentyTwelve and I was trying to find a way to change the text 'HOME' to my own language but I couldn't find anything in forums or what I found was obsolete (or at least the older theme)

    I found this into functions.php:

    /**
     * Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link.
     *
     * @since Twenty Twelve 1.0
     */
    function twentytwelve_page_menu_args( $args ) {
    	if ( ! isset( $args['show_home'] ) )
    		$args['show_home'] = true;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' );

    and I changed this single line to:

    $args['show_home'] = false;

    but I am not sure (as I don't know php) if it is the right one. Is it a good approach, or could / should do it an other way?

    Also, how can I delimit the appearance of the Home nav link to all other pages except the actual home page?

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    1. Create your own menu and add to it what you want:

    http://codex.wordpress.org/Appearance_Menus_Screen

    2. A better approach may be to add CSS that 'highlights' the page (menu item) the user is on...

    example:

    #access .current-menu-item > a, #access .current-menu-ancestor > a, #access .current_page_item > a, #access .current_page_ancestor > a {
    	background-color: #C0C0C0;
    }

    Use your color desired in above...

    See this CSS (in a Twentyeleven Child Theme) in action at my site:

    http://seacoastwebservice.com/

    (and a custom menu)

  3. WordPress Bum
    Member
    Posted 1 year ago #

    Are you making your menu under appearance - menu? Everything you are looking to do is fairly simple there.

  4. jdran
    Member
    Posted 1 year ago #

    (Sigh)
    I totally ignored that part. So it seems, I really went for the hard way. Thanks guys.

    About the second,
    Seacoast Web Design, I don't get what you mean.. maybe I wasn't clear..

    What I want is to let the "Home" navigation link (menu) appear on all pages except the home page.

Topic Closed

This topic has been closed to new replies.

About this Topic