ID: $post->ID -->\n";
$image = false;
if ( get_attached_media('image', $post->ID) ) {
$image = array_shift(get_attached_media('image', $post->ID));
$image = $image->ID;
echo "\n";
$imgs = get_attached_media('image', $post->ID);
foreach($imgs as $img)
echo "\n";
}
if (! $image) {
$image = get_post_thumbnail_id($post->ID);
echo "\n";
}
if ( $image ) {
/* $thumbsrc = wp_get_attachment_image_src($image->ID, 'optics-mws-gallery-thumb')[0]; */
$thumbsrc = wp_get_attachment_image_src($image, 'thumbnail')[0];
$fullsrc = wp_get_attachment_image_src($image,'full')[0];
$style = "";
echo "\n";
} else {
$thumbsrc = get_stylesheet_uri() . '/../270.png';
$tithumbsrc = get_stylesheet_uri() . '/../560.png';
echo "\n";
$style = "style='display: inline-block !important; background: #ddd;'";
}
/* echo "
\n"; */
echo "
\n";
echo "";
echo ' ';
?>