Tag Archives: featured image

Fix for Posts with a Featured Image not being sent in MailPress

There's a bug somewhere in MailPress 5.3 that prevents posts from being sent in your newsletter if they contain a featured image. I'm not exactly sure why this happens, but it appears to be related to MailPress's attempt to reproduce the TwentyTen theme's evil habit of changing your site header according to a post's featured image.

Something seems to go wrong in the process; but given that you probably don't want the image in the header of your emails to change according to a post's featured image either, the simplest solution is to disable this buggy behaviour entirely. To do this, you need to edit the file mailpress/mp-includes/class/MP_theme_html_.class.php.

In the function header_image, delete or comment out these 3 lines:

//    case ( $post_id && function_exists('has_post_thumbnail') && function_exists('get_post_thumbnail_id') && function_exists('wp_get_attachment_image_src') && $post_id && has_post_thumbnail( $post_id ) && ($image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'post-thumbnail')) && ($image[1] 
Continue reading…
Posted in MailPress | Tagged , , | 2 Comments

How to Stop a Post's Featured Image Appearing in Site Header

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' ) &&
        
Continue reading…
Posted in Themes | Tagged , | 2 Comments