• Resolved Droidex

    (@droidex)


    Trying this theme: in the official web http://2010dev.wordpress.com/ there is different headers every page, but i can not see how to do it on my installation.

    Thanks and keep the good work, it is a great theme!

Viewing 4 replies - 1 through 4 (of 4 total)
  • MichaelH

    (@michaelh)

    I believe that might be made possible if there is a post thumbnail on that page is uses it. Here’s the pertinent code from wp-content/themes/twentyten/header.php:

    <?php
    					// Retrieve the dimensions of the current post thumbnail -- no teensy header images for us!
    					$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail');
    					list($src, $width, $height) = $image;
    
    					// 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 ) && $width >= 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; ?>

    Thread Starter Droidex

    (@droidex)

    The problem is that there is no place to set the post-thumbnail, got the featured image, but not the post-thumbnail setting.

    Thanks for reply

    MichaelH

    (@michaelh)

    On a clean 3.0-beta install, was able to upload an image to the About page, clicked on the use as featured image and it used that image in the header when displaying that page.

    Thread Starter Droidex

    (@droidex)

    That worked!

    Thanks!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Different headers on every different page on Twenty Ten’ is closed to new replies.