if you check Marie Claire website :http://www.marieclaire.fr/
in each post that have slider gallery inside , they put a small icon gallery on the featured image of the post . what the condition to put it , how can be done for a WordPress website ??
i have this code for show image :
function show_image($args, $caption = '')
{
$postid = '';
$video = '';
$image_size = 'large';
$before = '';
$after = '';
$display = true;
$img_str = '';
$issingle = false;
extract($args);
if($postid == '')
{
return false;
}
$videostyle = "";
$isvideo = isvideopost($postid);
$img_str = "";
$thumbid = get_post_thumbnail_id( $postid );
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $postid ), $image_size );
if($image)
{
$image_file = $image[0];
$img_str .= $before;
if($isvideo == true && $issingle == false){
$img_str .= '<div class="videoimage">';
$videostyle = 'style="position: relative; top: 0; left: 0;"';
}elseif(has_term( 'video', 'post_tag',$postid)==true && $issingle == false){
$img_str .= '<div class="videoimage">';
$videostyle = 'style="position: relative; top: 0; left: 0;"';
}
$img_str .= '<img src="'.$image_file.'" '.$videostyle.'>';
if($isvideo == true && $issingle == false){
$img_str .= '<img src="'.THEME_URL.'/images/playicon/playicon_'.$image_size.'.png" style="position: absolute; top: 0; left: 0;"/>';
$img_str .= '</div>';
}elseif(has_term( 'video', 'post_tag',$postid)==true && $issingle == false){
$img_str .= '<img src="'.THEME_URL.'/images/playicon/playicon_'.$image_size.'.png" style="position: absolute; top: 0; left: 0;"/>';
$img_str .= '</div>';
}
$img_str .= $after;
if($display == true)
{
echo $img_str;
}else{
return $img_str;
}
}else{
return false;
}
}
what i need is to add codition if exist attachements image to show this icon on featured image
</div>