How to remove header image on subpages in Twenty Eleven (default theme)?

I'd like to remove the header image on all the pages except my "home"-page.

Any ideas?

Thks

Topic theme-twenty-eleven themes Wordpress

Category Web


This worked for me.

Change

if ( $header_image) :

to

if ( $header_image && is_front_page()) :


Edit the header.php file and modify the following lines (probably around line 78-82):

Before

        <?php
            // Check to see if the header image has been removed
            $header_image = get_header_image();
            if ( ! empty( $header_image ) ) :
        ?>

After

        <?php
            // Check to see if the header image has been removed
            $header_image = get_header_image();
            if ( ! empty( $header_image ) && is_front_page() ) :
        ?>

Remove the header image code from your category, post, single, etc files (leaving it in the index.php file).

If that is not of help, please explain the structure of your theme as well as post some code for additional help.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.