【发布时间】:2013-06-13 12:03:04
【问题描述】:
我正在使用 Simple Pie 来显示来自多个 RSS 源的内容。
我已成功显示 RSS 源的内容。我现在想要的是显示作者姓名或提要标题。
例子:
这是 RSS 源 URL:http://aaron.dietfreelife.com/feed/
我希望能够检索所附图表所示的提要标题。
这是我的代码规范:
<?php
foreach ($feed->get_items() as $item):
?>
<div class="item">
<h2><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></h2>
<p><?php echo $item->get_description(); ?></p>
<p><small>Posted on <?php echo $item->get_date('j F Y | g:i a'); ?></small></p>
</div>
<?php endforeach; ?>
任何帮助将不胜感激......
【问题讨论】:
标签: simplepie