2017-03-01 21 views
0

如果你检查嘉人Marie Claire网站:http://www.marieclaire.fr/如何在主页上的特色图像中放置图库图标?

在具有内部滑块画廊每个岗位

,他们把一个小图标库后的特色形象。 什么条件把它,如何可以做一个WordPress网站? image click on it

我有表演的图片此代码:

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; 
 
    } 
 
}

我需要的是是否存在附着物的图像显示功能的图像上此图标添加codition

+0

那么你面临的问题是什么? –

回答

相关问题