本題の通りで、取得したいのですが、タイトル・日付・ディスクリプションしか取得できません。
###下記がソースです
<?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://matome.naver.jp/feed/topic/1Lvc5'); $maxitems = 3; $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.n.j', strtotime($item_date)); echo $out_item_date; ?> </span><br> <span> <?php $matome_view = $item['matome_view']; echo $matome_view; ?> </span> <span> <?php $thumbnail = $item['media']['thumbnail']; echo $thumbnail; ?> </span> <a href='<?php echo $item['link']; ?>' target="_blank"> <?php echo $item['title']; ?> </a></li> <?php endforeach; ?>
回答3件
あなたの回答
tips
プレビュー