Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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".

What do I do?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
Thanks! Worked perfectly! –  dasmikko Oct 26 '12 at 11:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.