[Plugin: Featured Image] empty tag shows up in IE if no featured image is set
-
First: i like this plugin (especially the widget). thanks!
when i use it as an widget, there will be an empty img tag generated, when no featured image is set. So in Internet Explorer we see a placeholder, which doesn’t look fine.
It should be checked, if a featured image is set
So I suggest the following solution (addition)
function getting_featured_img() { $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); if ( has_post_thumbnail() ) : $mpfeatureimg = " <img src='" ; $mpfeatureimg .= $image[0]; $mpfeatureimg .= "' />"; return $mpfeatureimg; endif; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Featured Image] empty tag shows up in IE if no featured image is set’ is closed to new replies.