How to remove header image on subpages in Twenty Eleven (default theme)? olatechproMarch 6, 20230 Views I’d like to remove the header image on all the pages except my “home”-page. Any ideas?Read MoreHow can I use a logo in the header?Migrated WordPress site renders ChineseHow to make theme elements customizable in wordpress? Thks Post Views: 0 Related postsGet rid of this Strict Standards warningWooCommerce: get_current_screen not working with multi languageCan’t login on WordPressForce HTTPS using .htaccess – stuck in redirect loopWordPress: Ajax not working to insert, query and result dataHow Can I pass an image file to wp_handle_upload?
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() ) : ?> Log in to Reply
This worked for me. Change if ( $header_image) : to if ( $header_image && is_front_page()) : Log in to Reply
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. Log in to Reply
Edit the
header.php
file and modify the following lines (probably around line 78-82):Before
After
This worked for me.
Change
to
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.