Php WordPress fetch_feed()->;获取项目()->;再找一个

Php WordPress fetch_feed()->;获取项目()->;再找一个,php,wordpress,rss,Php,Wordpress,Rss,我想从RSS结构将新闻导入我的WordPress站点,如下所示: <item> <title>...title...</title> <link>..link...</link> <description>...short description...</description> <full-text>...full-text...</full-text>

我想从RSS结构将新闻导入我的WordPress站点,如下所示:

<item>
    <title>...title...</title>
    <link>..link...</link>
    <description>...short description...</description>
    <full-text>...full-text...</full-text>
    <enclosure url="http://.../post_image123.jpg" type="image/jpeg"/>
    <category>...category...</category>
    <pubDate>Wed, 20 Nov 2013 17:32:41 +0400</pubDate>
</item>

通过一些简单的搜索,我发现:


您可以尝试获取内容()

通过一些简单的搜索,我发现:

您可以尝试获取内容()

试试看:

AFAIK
全文
是一个非标准的提要元素,因此SimplePie的方法无法处理它。

尝试:


AFAIK
full-text
是一个非标准的提要元素,因此SimplePie的方法无法处理它。

您是否尝试过
$item['full-text']
?现在尝试过,致命错误:无法使用SimplePie\u item类型的对象作为数组提要元素实际上被称为
full-text
?请尝试过
$item['full-text']
?现在尝试过,致命错误:无法使用SimplePie\u Item类型的对象作为数组feed元素实际上被称为
全文
?请看这个文档,get\u Content()函数只返回描述元素。我看了这个文档,get\u Content()函数只返回描述元素。谢谢$item->get_item_tags(“”,“全文”)[0][data']我的作品,谢谢$item->get_item_标记(“”,“全文”)[0][data']
<?php 
$rsslist = array(
    'http://kavkazinfo.net/backend.php?region=%C4%E0%E3%E5%F1%F2%E0%ED',
    'http://kavkazinfo.net/backend.php?region=%C8%E7%F0%E0%E8%EB%FC',
);

// Fetch all of the feeds into a simplePie mashup
$rss = fetch_feed($rsslist);
// Set the max items to either 5 or all items if there are less than 10
$maxitems = $rss->get_item_quantity(5);

// Get the items (0-5)
$rss_items = $rss->get_items(0, $maxitems); 

// If there are no items, output that
if ($maxitems == 0) {
    echo '<li>No items.</li>';
// Otherwise loop over the items
} else {
    foreach ($rss_items as $item) { ?>
        <li>
        <?php echo $item->get_fulltext(); ?> // Of course, get_fulltext() doesn't exist as a function, so how do I get it?
        </li>
    <?php 
    }
}
?>
get_item_tags( '', 'full-text' )