サムネイルタグ(WP,WelCart)
WP サムネイルURL取得タグ
$thumb=wp_get_attachment_image_src(get_post_thumbnail_id(), true); $thumb[0]= url が戻ってる。 $thumb[1]= 画像幅 が戻ってる。 $thumb[2]= 画像高 が戻ってる。 $thumb[3]= 0 が戻ってる。 // こんな感じで使う list($imgurl,$imgwidth,$imgheight)=wp_get_attachment_image_src(get_post_thumbnail_id(), true);
wp サムネイルの img タグ
$rt_img_tag=wp_get_attachment_image( $pctid, array(80,80), true ); // 惜しむらく alt が入ってこないので、こうする。 $rt_img_tag=str_replace("alt=\"","alt=\"".$post->post_title." ",$rt_img_tag); echo $rt_img_tag;<img src=”~” alt=””> を代入してくれる。
WP サムネイル表示タグ
the_post_thumbnail( array(100,100) );<img src=”~” alt=””> を代入してくれる。
WelCart サムネイルURL取得タグ
※ループ内での使用$main_pict_url=usces_the_itemImageURL(0,'return'); // メイン画像 $sub1_pict_url=usces_the_itemImageURL(1,'return'); // サブ画像http://~/pict.jpg 代入してもらえる。
WelCart サムネイル img タグ
<?php usces_the_itemImage(); ?><img src=”~”> を Echo してくれちゃう。
WelCart サムネイルURL表示タグ
その場で URLを吐き出す。usces_the_itemImageURL(0); // メイン画像 usces_the_itemImageURL(1); // サブ画像http://~/pict.jpg とか Echo してくれちゃう。
スポンサーリンク