hanuman6
7/13/2013 - 11:57 AM

新着情報を表示(任意のカテゴリーの記事を表示)

新着情報を表示(任意のカテゴリーの記事を表示)

<?php the_date(); ?>
<div id="topnews">
<a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/rss.jpg"  /></a>
<div><?php $posts = get_posts('numberposts=6&category=0&order=desc'); ?>
<?php foreach($posts as $post): ?>
<dl><dt><span><?php the_time('Y.m.d'); ?></span></dt>
<dd><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></dd></dl>
<?php endforeach; ?>
</div></div>