WordPress.org

Support

Support » Themes and Templates » [Resolved] [Twenty Eleven] Replacing the header text on home page

[Resolved] [Twenty Eleven] Replacing the header text on home page

  • Revived
    Participant

    @revived

    On the home page, I’d like the entry header to say something else other than “Home” … which is the page title.

    Is this possible? Perhaps with a new page template (if so, how?)

    http://c-o-o-p.org/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Any reason you can’t re-title the page to your preferred title? That seems like the simplest solution.

    Otherwise:

    First create a child theme for Twenty Eleven so you don’t modify the original code. Activate this theme on your website.

    Copy content-page.php from Twenty Eleven into the child theme’s folder.

    Within the copy of content-page.php, replace the following code for the page title:
    <?php the_title(); ?>

    With this:

    <?php if(is_front_page()) {
    echo 'Your Preferred Home Page Title';
    }
    else {
    the_title();
    } ?>

    With this solution, any page you designate as the Front page under Settings -> Reading will have “Your Preferred Home Page Title” instead of the given page title.

    Revived
    Participant

    @revived

    Works great, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Twenty Eleven] Replacing the header text on home page’ is closed to new replies.