Tag Archives: blog

Rename/remove the default “Home” menu link in WordPress Twenty Eleven Theme

If you’re using the “Twenty Eleven” Theme in WordPress and you want to either rename or remove the default “Home” link in your main menu bar, this is what you need to do:

  1. Create a child theme of “Twenty Eleven”. You only need a basic child theme with a default style.css file and an empty functions.php file.
  2. Add the following code to your functions.php file:
add_filter('wp_page_menu_args', 'twentyelevenchild_page_menu_args', 20);

function twentyelevenchild_page_menu_args( $args )
{
    $args['show_home'] = {value};
    return $args;
}

where {value} is either:

  • “new name” – to give the “Home” link a new custom name, or
  • false – to disable the “Home” link altogether.

It’s possible that this approach will work for other Themes, but I have not tested that – please add a comment if you find out!

How to remove the “Leave a Reply” Comment Box from a WordPress Page

For the standard WordPress “Twenty Eleven” Theme in WordPress v3.4.1, it’s very easy to remove the standard “Leave a Reply” box from a given page:

  1. Edit the page in question.
  2. Select the “Screen Options” drop-down menu from the top-right corner of the edit interface.
  3. Select the “Discussion” checkbox to make the Discussion options appear at the bottom of the screen, below the page editor.
  4. Scroll down to the “Discussion” options and uncheck both the “Allow comments” and “Allow trackbacks and pingbacks on this page” checkboxes.
  5. Then “Update” the page as normal.

The “Leave a Reply” box should now be gone! Now that you’ve enabled the “Discussion” options panel by default, you will easily be able to disable comments for any page by unchecking the same two options below the page content editor.