Problem with fetch_rss
-
I am new to this… here is my problem.. I’m trying to get Headlines from a local newspapers rss feed to show in the sidebar…
When I paste the fetch_rss code… it will not display anything following that code…
Here is the code I used…
<h2><?php _e('Headlines'); ?></h2> <?php // Get RSS Feed(s) include_once(ABSPATH . WPINC . '/rss.php'); $rss = fetch_rss('https://feeds.orlandosentinel.com/orlandosentinel/news/local/seminole/'); $maxitems = 5; $items = array_slice($rss->items, 0, $maxitems); ?> <ul> <?php if (empty($items)) echo ' <li>No items</li> '; else foreach ( $items as $item ) : ?> <li><a>' title='<?php echo $item['title']; ?>'> <?php echo $item['title']; ?> </a></li> <?php endforeach; ?> </ul>
Any help is appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem with fetch_rss’ is closed to new replies.