Hi! Thanks for the link. It is very complicated to offer a proper solution for this theme; there are many, many different files that have to be edited in order to be able to use external featured image. Nonetheless, I found a simple workaround that should do the trick. Please note you’ll have to edit a couple of files (using the Theme Editor in WordPress).
Warning: Before editing any PHP files, make sure you have a backup of your WordPress installation. If anything goes wrong, you’ll want to have it ??
File 1: admin/bdayh.php
. Lines 2336-2343 have the following code:
function bd_post_image($size = 'thumbnail'){
global $post;
$image = '';
$image_id = get_post_thumbnail_id($post->ID);
$image = wp_get_attachment_image_src($image_id,
$size);
$image = $image[0];
if ($image) return $image;
Just add the following code after the previous fragment, without deleting any existing code:
// ******************************************************************
// ******************************************************************
$image = get_the_post_thumbnail( $post->ID, $size );
if ( $image ) {
$image = str_replace( '<img src="', '', $image );
$image = str_replace( '" />', '', $image );
return $image;
}
// ******************************************************************
// ******************************************************************
File 2: aq_resizer.php
. Lines 26-27 have the following code:
//validate inputs
if(!$url OR !$width ) return false;
Just add the following code after the previous fragment, without deleting any existing code:
// ******************************************************************
// ******************************************************************
if ( strpos( $url, 'data:image/gif;' ) === 0 ) {
if ( !$height )
$height = int( $width * 2 / 3 );
$size = sprintf( 'style="width:%spx;height:%spx;', $width, $height );
return str_replace( 'style="', $size, $url );
}
// ******************************************************************
// ******************************************************************
I’ve tested it on a local installation and it looks good (there are external featured images in the Latest Posts page). There might be some cases in which you’ll need to tweak your CSS files.
Please let us know if this works!