2010年11月19日金曜日

wordpress メモ

Topに新着記事をのせるコード<div id="news">
 <h3>新着情報</h3>
  <dl>
    <?php $myposts = get_posts('numberposts=5&orderby=post_date'); foreach($myposts as $post) : ?>
     <dt><?php the_time('Y年n月j日'); ?></dt>
     <dd><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></dd>
    <?php endforeach; ?>
  </dl>
</div>

0 件のコメント:

コメントを投稿