The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Different headers on every different page on Twenty Ten (5 posts)

  1. Droidex
    Posted 6 years ago #

    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!

  2. MichaelH
    Posted 6 years ago #

    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:

    					// 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; ?>
  3. Droidex
    Posted 6 years ago #

    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

  4. MichaelH
    Posted 6 years ago #

    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.

  5. Droidex
    Posted 6 years ago #

    That worked!


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.