• orlandographix

    (@orlandographix)


    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)
  • This is an ongoing issue with rss_fetch(). I have no answers, as I’m finding the same problem. It seems that the feed is always at fault, but you have to verify outside of WP. The actual feed problem will vary.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with fetch_rss’ is closed to new replies.