ベストセラー スティング

//welcartベストセラー サムネイル+順位表示が画像
add_filter('usces_filter_bestseller', 'my_bestseller_func', 10, 3);
function my_bestseller_func() {
    $args = func_get_args();
    list($html, $post_id, $index) = $args;
    $post = get_post($post_id);
    if ( $index == 0 ){
    $img = '/wp-content/themes/D/d/img/rank/1.png';
}    elseif ( $index == 1 ){
    $img = '/wp-content/themes/D/d/img/rank/2.png';
}    elseif ($index == 2){
    $img = '/wp-content/themes/D/d/img/rank/3.png';
}    else {
}
 $index = $index + 1;
	//usces_have_skus();
	global $usces;//計算始め
	$price = usces_the_firstPrice( 'return',$post );//売価
	$tax = $usces->getTax( $price );//売価×基本設定の税額(税計算方法も考慮します)
	$dprice = number_format($price + $tax);	
	$did = $post_id;
	$did2 = '[REVIEWPRESS_RICH_SNIPPET id="'.$did.'"]';
	$did3 = do_shortcode($did2);
	
    $list = '<a href="' . get_permalink($post_id) . '" class="top_new_item_box"><img src="' . $img . '" width="24" style="padding-bottom:6px; padding-right:6px;" /><span class="rank_num">'.$index.'.</span><div class="top_new_item_sam">
' . usces_the_itemImage(0, 300, 300, $post, 'return' ) . '</div><div class="top_item_name">' . $post->post_title . '</div>
      <div class="top_item_disp">¥'.$dprice.'</span><em class="tax">(税込)</em>
	  
	  		  <div>
	'.$did3.'
</div>
		 
</div>




</a>
';
	
    return $list;
}