情報に日付を追加

タブの情報に日付を追加しましょうか(・∀・)
まずはWPの方からv( ̄Д ̄)v イエイ
index.phpに追加!

<?php if(have_posts()): while(have_posts()): the_post(); ?>
<li>

<?php the_time('Y.m.d'); ?>
<a href="<?php the_permalink(); ?>
" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
<?php endwhile; endif; ?>

ほいほい(*´∀`*)

次はRSSの方ね(´・ω・`)
めんどくさかった。。。

WordPressで日付入りRSSを取得して表示させる

ここ見たらすぐっすよ( ´∀`)bグッ!

<?php
 include_once(ABSPATH . WPINC . '/rss.php');
 define('MAGPIE_OUTPUT_ENCODING' , 'UTF-8');
 define('MAGPIE_CACHE_DIR' , './cache');
 define('MAGPIE_FETCH_TIME_OUT', 30);
 define('MAGPIE_CACHE_AGE', 60*60);
 $rss = fetch_rss('http://ie.u-ryukyu.ac.jp/news-ie/feed/');
 $maxitems = 10;
 $items = array_slice($rss->items, 0, $maxitems);
?>
<ul>
 <?php if (empty($items)) echo '<li>No items</li?>';
 else
 foreach ( $items as $item ) : ?>
  <li>
  <span>
  <?php $item_date  = $item['pubdate'];
   $out_item_date  = date('Y.m.d', strtotime($item_date));
   echo $out_item_date; ?>
  </span>
  <a href='<?php echo $item['link']; ?>' target="_blank">
  <?php echo $item['title']; ?>
  </a></li>
 <?php endforeach; ?>
</ul>