Re: トップページのデザイン

#62473
nanbu
キーマスター

こんにちは。

トップページのイメージはあくまでサンプルとして利用いたしておりますので、残念ながらショップのイメージとしてはご利用いただけません。

新着商品のグリッドを追加したい場合は、テーマ内のhome.php を編集します。

まず以下の行をそっくりそのままコピーしてすぐ下にペーストします。

<div id="top_reco">
<h3 class="title"><img src="<?php bloginfo('template_url'); ? />/images/osusume.png" alt="<?php _e('Items recommended','usces') ?>" /><?php _e('Items recommended','usces') ?></h3>

<ul class="clearfix">
<?php $reco_ob = new wp_query(array('category_name'=>'itemreco', 'posts_per_page'=>10, 'post_status'=>'publish')); ?>
<?php if ($reco_ob->have_posts()) : while ($reco_ob->have_posts()) : $reco_ob->the_post(); usces_the_item(); ?>
<li class="thumbnail_box">
<div class="thumimg"><a href="<?php the_permalink() ?>"><?php usces_the_itemImage($number = 0, $width = 108, $height = 108 ); ?></a></div>
<div class="thumtitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php usces_the_itemName(); ?>&nbsp;(<?php usces_the_itemCode(); ?>)</a></div>
<?php if (usces_is_skus()) : ?>
<div class="price"><?php _e('$', 'usces'); ?><?php usces_the_firstPrice(); ?><?php usces_guid_tax(); ?></div>
<?php endif; ?>
</li>
<?php endwhile; else: ?>
<li id="nothing"><?php _e('Sorry, no posts matched your criteria.'); ?></li>
<?php endif; wp_reset_query(); ?>
</ul>
</div>

そうすることでお勧め商品が2回表示されることになります。後は下のグリッドを新商品に変更します。

<h3 class="title">****</h3>

をお好みに修正してください。

次に、

**** new wp_query(array('category_name'=>'itemreco', ****

の部分を

**** new wp_query(array('category_name'=>'itemnew', ****

に変更してください。

これでたぶんOKです。