Display an external feed as a page: parsing an RSS Feed
-
Good morning from Canada,
I have set up a syndicated feed list through “Rojo.com” (excellent service) and I would like to parse it to a page. I already have it working for the title and the link, however the “content/description” is formatted in an array that doesn’t seem to parse.
Here is the code:
<!-- RSS feed --> <?php if (is_page('RSS Syndication') ){ require_once(ABSPATH . WPINC . '/rss.php'); $rss = fetch_rss('https://www.server.com/externalfeed.rss'); for( $i=0; $i<25; $i++ ) { $item=$rss->items[$i]; $pubdate=substr($item['pubdate'], 0, 16); echo ' <a href="'.$item['link'].'" title="'.$item['title'].'"><b>'.$item['title'].'</b></a> <i>'.$pubdate.'</i> <i>'.$item['content'].' content</i> <i>'.$item['summary'].' summary</i> <i>'.$item['title'].' title</i> <i>'.$item['content'].' content</i> <a href="'.$item['link'].'">more...</a> '; } } ?> <!-- End of feed -->
First of all, the content outputs “Array”, and the summary is blank. Second, is there a built in parser in rss.php that I can use? I noticed the “get_rss” function in the bottom of the rss.php file.
Thank you for your support, I am extremely new to this.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Display an external feed as a page: parsing an RSS Feed’ is closed to new replies.