Change the menu home link to something else

I’m using the built in menu system, and I wan’t to change the text of the home menu link to something else, like “hjem”, and i have tried placing this in the code:

<?php wp_page_menu( array( 'show_home' => 'Hjem', 'sort_column' => 'menu_order' ) ); ?>

But that did nothing but show the menu, with the home menu text “Home”.

Read More

What do I do?

Related posts

Leave a Reply

1 comment

  1. Funnily enough, I see the same behavior in WordPress 3.4.2 and 3.5-beta2. No plugins active, theme TwentyEleven.

    Even setting show_home as false will show the Home button ?!

    Checking the core, I see this filter that does the trick:

    add_filter( 'wp_page_menu_args', 'wpse_70551_change_page_menu');
    
    function wpse_70551_change_page_menu($args) {
        $args['show_home'] = "Hjem";
        return $args;
    }
    

    [Update]
    This was a bug with the Bundled Themes.

    The culprit is twentyeleven_page_menu_args()
    (twentytwelve_page_menu_args() in Twenty Twelve).

    It ignores any passed value and enforces true instead:
    http://core.trac.wordpress.org/browser/tags/3.4.2/wp-content/themes/twentyeleven/functions.php#L372

    22331.patch​ is a fix for all three themes.