0
我有2个网站,我希望使用RSS订阅源从另一个展示一些帖子。以RSS订阅源重新订购商品
麻烦的是,默认似乎是按发布日期排序,因为我需要它们按标题排序。我使用Wordpress,它使用SimplePie(我相信这很常见?)。
有没有办法在显示它们之前重新排序这些项目?谢谢。
/**
* $feed = the RSS feed to display (set via CMS option)
* $num_posts = the number of posts to display from the feed (set via CMS option)
*/
$max_items = 0;
if($feed !== '') :
$rss = fetch_feed($feed);
if(!is_wp_error($rss)) :
$max_items = $rss->get_item_quantity($num_posts);
$rss_items = $rss->get_items(0, $max_items);
endif;
endif;