• TwentyEleven by default shows two links under the header graphic, “Home” and “Sample Page”.
    I’d like to change the labels and the underlying URL’s but haven’t found a menu in the Dashbar, and couldn’t find the actual html code. Having written my web pages in html I should be able to make the changes in the code if necessary, if only I knew where to look.
    wp is installed on my host’s linux server under my root. Tried looking in several php files in …/wp/wp-content/themes/twentyeleven but couldn’t find the html lines. Thanks for your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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.

    Thread Starter donstephan

    (@donstephan)

    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 https://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.

    Thread Starter donstephan

    (@donstephan)

    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!

    chip sheppard

    (@ultranorman)

    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' );

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘TwentyEleven Header Default Links’ is closed to new replies.