add_filter('post_thumbnail_html', 'multi_format_thumbnail', 10, 5);
function multi_format_thumbnail( $html, $post_id, $post_thumbnail_id, $size, $attr ){
# Проверяем, что картинка существует
if ($post_thumbnail_id && ! empty( $attachment = get_post( $post_thumbnail_id ) ) ) {
$image="........"
} else {
$image = '<img src="'. get_bloginfo('template_url') .'/assets/images/not-image.jpg" ';
}
return $image;
}
img.post-thimb:before {
content: " ";
display: block;
position: relative;
top: 25px;
left: 0;
height: 200px;
width: 100%;
background-color: rgb(255, 255, 255);
border: 1px dashed rgb(200, 200, 200);
border-radius: 5px;
background-image: url(/wp-content/uploads/2016/01/1111-100x100.jpeg);
background-repeat: no-repeat;
background-position: 50%;
}