1

i am trying to remove the header from one page (actually all the pages exept the Home page) i did some research i found this code #post-xx .entry-title{display:none;} whereas the xx is the page ID . but it doesn t work for me do you know the exact code and exact place (and what s the page ID), or any other way... any help would be appreciated

my website www.danielbelseamusic.com

thanks a lot,daniel

  • can you explain what you mean exactly with 'header'? i guess you mean the title of the page? – ptriek Dec 15 '11 at 16:37
1

To remove the header image of the Twenty Eleven theme on other pages then your homepage, change the following code in header.php (in wp-content/themes/twentyeleven)

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() ) :
    ?>
| improve this answer | |
  • hi ptriek . there is my title danielbelseamusic , and there is a picture ( i call it the header picture) . i don t want this picture , it takes too much place , but the title is fine . also ,in which .php should i make changes (if is-stuffs)? – danielbelsea Dec 15 '11 at 17:00
  • i updated my answer – ptriek Dec 15 '11 at 17:04
  • thanks ptriek ,i have to check that out, and thank you all of you guys , you are surely very nice . – danielbelsea Dec 15 '11 at 17:18
  • i just noticed my first code block was showing the wrong code, i updated this... – ptriek Dec 15 '11 at 17:20
  • i am sorry ptriek . i don t understand . i don t see all that in the .php header . are you telling me to add on my .php header that :<?php // Check to see if the header image has been removed $header_image = get_header_image(); if ( ! empty( $header_image ) && is_front_page() ) : ?> i am quite confused .merci bien:) – danielbelsea Dec 15 '11 at 17:35
0

In your comment to Viruthagiri, you mention that "the picture takes too much place", so, assuming you actually want to remove an image in the header, and not the header itself, you could do something quick like this :

 <?php if( is_home() ) { ?>
      <img src="your-image-source-here" />
 <?php } ?>

Inside your header.php file

| improve this answer | |
  • hi Shane . but i want the image on my home page . i just don t want it in the other pages – danielbelsea Dec 15 '11 at 17:07
  • that if statement checks if it is home and prints the image. It will not display on other pages – ferenyl Dec 15 '11 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.