卸 卸売り アパレル アクセサリーの仕入れ

wordpress+welcartのブログは セレクトショップ furaha clothingのブログに移動しました。→ショップブログ
何とか少しずつ 形になってきた my wordpress&welcart!!!!
トップページ(この場合は index.php)に新商品のループとお勧め商品の商品画像のループの2つを載せたい!
で、またデススパイラルに嵌るの巻き。
どうやら、<?php query_posts(‘cat=●●&showposts=●’); ?>と言うループは1回!しか使ったらあかんらしい。
2個目もこのループを使うと、ぐっちゃぐっちゃになりました。で、ここで↓登場。
<?php endif; wp_reset_query(); ?>
これをいれることで、もう今のループを元に戻せるそうです。で、結局こうなった。↓おすすめ商品画像ループ(150pix×150pix)
<?php $reco_ob = new wp_query(‘showpost=●&cat=●’); ?>
<?php if ($reco_ob->have_posts()) : while ($reco_ob->have_posts()) : $reco_ob->the_post(); usces_the_item(); ?>
<div class=”thumbnail_box”>
<div class=”thumimg”><a href=”<?php the_permalink() ?>”><?php usces_the_itemImage($number = 0, $width = 150, $height = 150 ); ?></a></div>
<div class=”thumtitle”><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php usces_the_itemName(); ?></a></div>
<?php if (usces_is_skus()) : ?><?php endif; ?>
</div><?php endwhile; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
<?php endif; wp_reset_query(); ?>
で、その下に、新商品の画像ループ
<p><?php echo category_description(item); ?></p>
<?php query_posts(‘cat=●●&showposts=●●’); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); usces_the_item(); ?>
<div class=”thumbnail_box”>
<div class=”thumimg”><a href=”<?php the_permalink() ?>”><?php usces_the_itemImage($number = 0, $width = 150, $height = 150 ); ?></a></div>
<div class=”thumtitle”><a href=”<?php the_permalink() ?>” rel=”bookmark”><?php usces_the_itemName(); ?></a></div>
</div><?php endwhile; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
<?php endif; ?>
</div>
はーこれで何とか出来たわ。
凄いここに嵌ったわ。
参考memo:wordpressでブログ以外のサイトを作る時の色々(の中の1ページの中で複数ループを使う)
そして、メモ的に。
サイトマップのページ的なページを1ページ作りたい時。
商品&BLOG&NEWS・・・。取り敢えず、全部やな。
<?php wp_get_archives(“type=postbypost”);?>
このパターンが 全ページ表示みたい。
<?php
/*
Template Name: ●●
*/
?>
<?php get_header(); ?>
<div id=”main”>
<div id=”pankuz”>
<p><?php
if(function_exists(‘bcn_display’))
{
bcn_display();
}
?></p>
</div>
<?php the_post() ?>
<h2 class=”page-title”><?php the_title(); ?></h2>
<div class=”item”>
<?php the_content() ?>
<?php wp_get_archives(“type=postbypost”);?>
</div>
</div>
これで何とかクリアー!下に sidebar.php&footer.phpも付けるのだ。