• I need some help. I’m new, but determined. I’ve set up my twenty ten child and installed the plug in for enhanced editor. Ready (at last) to start building my web page. I need to eliminate the header on the static page I’m ready to build. Can you give me some specific steps? I want to do it right. Can I put a ! somewhere?
    Thank you for any help you can give to this slow learner – smile.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You’d need to copy Twenty Ten’s header.php file over into your child theme, then edit it. Try replacing:

    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    if ( is_singular() &&
    		has_post_thumbnail( $post->ID ) &&
    		( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    		$image[1] >= HEADER_IMAGE_WIDTH ) :
    	// Houston, we have a new header image!
    	echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    else : ?>
    	<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    <?php endif; ?>

    with:

    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    if ( is_single() &&
    		has_post_thumbnail( $post->ID ) &&
    		( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    		$image[1] >= HEADER_IMAGE_WIDTH ) :
    	// Houston, we have a new header image!
    	echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    elseif (!is_page() ) : ?>
    	<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    <?php endif; ?>
    Thread Starter bobaremax

    (@bobaremax)

    Thanks fot the quick response. I’ll try it – looks complicated, but after what I’ve been through so far, I’ll plung ahead.

    Looking at the code you gave me, it looks like this kills the header image. Does it eliminate all of the header and resore the space?

    How do you people learn all this?

    It only kills the header image on static pages (!is_page).

    How do you people learn all this?

    Lots of practice and masses of past mistakes. ??

    Thread Starter bobaremax

    (@bobaremax)

    I just looked at the header php (copy below) and don’t see the section of code you mentioned that I can modify. I really hat to be so dumb about things, but can you help some more? I really want to kill the whole header.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The original code I gave above was taken straight from the current version of Twenty Ten.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Deleting or hiding the header on my static page.’ is closed to new replies.