The TwentyTen theme has an annoying feature which causes the image in your site header to be replaced by a post’s Featured Image. I have no idea what they were thinking, other than that the featured image wasn’t used anywhere else in the theme, so perhaps they should use it to override the image in the header.

Well that’s a bad idea. Even though the theme doesn’t use it, sites like Facebook will use the featured image as the thumbnail when a post is shared. It just doesn’t make sense to change your site header according to the featured image.

In order to fix this, you have to edit your theme’s header.php, preferably by creating a child theme. Search for these lines:

// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
        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 );
elseif ( get_header_image() ) :

And change them to:

// Always use the header image; dont put the featured image in the header!
if ( get_header_image() ) :

If you use MailPress, note that it attempts to follow suit; and even worse, in doing so it triggers a bug that prevents posts with a featured image from being sent at all. See [intlink id=”990″ type=”post”]this article on how to modify it too[/intlink].


Graham

I'm the creator of BuildYourBlog.net.

2 Comments

Putu · September 22, 2014 at 10:01 am

Very helpful guide ineded, thank you.It did take me a while to figure out that I also needed to enable the Connection_PHP_mail add on, under plugins, before my test mails would send –a0before that, they failed.I’d like to follow your cron instructions, but made the probably bad choice of Ipage.com as a host, and they have a proprietary control panel (not cpanel) and no way of setting up cron jobs. (Note to self: always choose host with cpanel in future.)I have a further question – how can one set the day/time when a weekly or monthly email goes out? I am about to start work on another blog/mail project where it’s important that a weekly bulk mail goes out on a Monday evening –a0but I can’t see any setting for this in Mailpress. David recently posted..South Africa’s electricity regulator approves two more CSP applications

Amanda Waters · December 31, 2013 at 11:50 pm

Finally! I was having this issue on my blog (Baby Names) for 2 days and couln’t find a solution. It was so easy! Many thanks and all the best in 2014 🙂

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.