combine multiple feeds with fetch_feed and display blog titles for each item?
I'm trying to display multiple feeds using the fetch_feed function. Its working well thus far except I can't figure out why the title for each individual rss feed will not show up. Here is my code:
?php // Get RSS Feed(s)
include_once(ABSPATH . WPINC . '/feed.php');
$rsslist = array( 'http://www.lt11.com/rss',
'http://feeds.feedburner.com/climbingnarc'
);
$rss = fetch_feed($rsslist);
if (!is_wp_error( $rss ) ) :
$maxitems = $rss-get_item_quantity(25);
$rss_items = $rss-get_items(0, $maxitems);
endif;
?
?php if ($maxitems == 0) echo 'liNo items./li';
else
foreach ( $rss_items as $item ) : ?
li class="feed"
a href='?php echo esc_url( $item-get_permalink() ); ?'
title='?php echo 'Posted '.$item-get_date('j F Y | g:i a'); ?'
?php echo esc_html( $item-get_date('j/n/Y - g:i A') ); ? - div class="feeditemtitle"?php echo esc_html( $item-get_title() ); ?/div - ?php echo esc_html($rss-get_title() ); ?/a
/li
?php endforeach; ?
Its that list bit that calls for the title of the rss feed. If I only fetch one feed then the title shows up. When I fetch more than one feed as in the example above, the title does not show up. Any ideas on how to fix this? Thanks!