Do not edit the Twenty Eleven theme. It is the default WordPress 3.2 theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. Create a child theme for your customisations. Once your child theme is active, we should be able to help with the customisation.
You can remove the Home link by adding an amended version of twentyeleven_page_menu_args() to your child’s functions.php file. The Sample Page can just be deleted.
Thanks for the excellent suggestion. Following the “Codex:Child Themes” using CPanel’s File Manager I created the new directory /home/cc…./public_html/blog/wp/wp_content/themes/twentyeleven-child and in that new directory I created a file named style.css with the following content (copied after I saved and re-displayed the file)
/*
Theme Name: Twenty Eleven Child
Theme URI: stephanwoodworking.com/blog/wp
Description: Child theme for the Twenty Eleven theme
Author: Don Stephan
Template: twentyeleven
Version: 0.1.0
*/
I did not proceed beyond that point in “Codex:Child Themes.”
My goal is to keep two links, but have “Home” read “Blog Home” with the url unchanged, and the second label “Sample Page” read “Stephan Woodworking Home” and the actual url be http://www.stephanwoodworking.com. It’s not necessary (to me) to delete the Sample Page layout.
Is there a good book on WordPress you can recommend to me for future reference as the Codex is hard for me to follow threads.
thanks.
I did not proceed beyond that point in “Codex:Child Themes.”
Why not? The Codex is the best and most up-to-date resource for WordPress.
I didn’t go further because the next section of the codex was changing the title’s color. I didn’t activate the child theme because I didn’t know if that should be done yet.
I remember Fortran and COBOL, and have become somewhat proficient with basic HTML, but the rest of “Codex:Child Themes” is beyond me. I’d love additional direction on updating the “Home” and “Sample Page” links on the TwentyEleven theme.
Thanks for your patience.
Don Stephan
Did you ever figure this out?
I would love to rename the home link to something like “blog home” as well.
You can remove the Home link by adding an amended version of twentyeleven_page_menu_args() to your child’s functions.php file.
Yes, you can just use the function:
function twentyeleven_page_menu_args( $args ) {
$args['show_home'] = false;
return $args;
}
Hope this helps!
Above function needs to be amended AFTER the theme setup otherwise the parent theme’s function will cause a declaration error…
function remove_homelink( $args ) {
remove_filter('wp_page_menu_args', 'twentyeleven_page_menu_args');
$args['show_home'] = false;
return $args;
}
add_action( 'after_setup_theme', 'remove_homelink' );