<?php
echo '<div class="goods-single-thumb-container">';
if (has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
the_post_thumbnail('medium', array('class' => 'goods-single-thumb'));
echo '</a>';
} else {
// show default image if the thumbnail is not found
echo '<img class="goods-item-thumb" src="' . plugins_url( '/img/gi.png' , dirname(__FILE__) ) . '" alt="">';
}
echo '</div>';
?>
<?php
echo '<div class="goods-single-thumb-container">';
if (has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
echo '<a title="' . the_title_attribute('echo=0') . '" >';
the_post_thumbnail('medium', array('class' => 'goods-single-thumb'));
echo '</a>';
} else {
// show default image if the thumbnail is not found
echo '<img class="goods-item-thumb" src="' . plugins_url( '/img/gi.png' , dirname(__FILE__) ) . '" alt="">';
}
echo '</div>';
?>