Support » How-To and Troubleshooting » fetch_feed not working

fetch_feed not working

  • Well, I used the recommended code etc in order to pull my twitter feed; this is the code:

    <?php // Get RSS Feed(s)
    // Get a SimplePie feed object from the specified feed source.
    $rss = fetch_feed('http://twitter.com/statuses/user_timeline/2893631.rss');
    // Figure out how many total items there are, but limit it to 3.
    $maxitems = $rss->get_item_quantity(3); 
    // Build an array of all the items, starting with element 0 (first element).
    $rss_items = $rss->get_items(0, $maxitems);
        <?php if ($maxitems == 0) echo '<li>No items.</li>';
        // Loop through each feed item and display each item as a hyperlink.
        foreach ( $rss_items as $item ) : ?>
            <a href='<?php echo $item->get_permalink(); ?>'
            title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
            <?php echo $item->get_title(); ?></a>
        <?php endforeach; ?>

    It stops and just says “No items.” And trust me, that feed definitely has new items every day!

    The web page is http://riverscapewebstudios.com and I”m running 2.9.1 – so my question is, is there something I’m doing wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The only thing I can think of is that it’s pulling a Twitter feed; however, I tried it with other feeds, and it still didn’t work 😐

    Other nuances: I am running the same theme locally, and live. Locally the RSS actually *does* work, but live it does *not*.



    See my post here too, as I am also having issues with this. My problems are the same actually — I can not get any info from other WordPress blogs using RSS2.0, so I want to make the “No items” work. The “No items” does not work for me, but it seems to work for you?



    I still have this similar problem… does anyone else have this problem or a solution?

    Hi, had exact same problem; feed working locally on MAMP, not live. Seems to have been fixed by switching


    instead of


    Shouldn’t work but it does for me… would like to know the real story behind what’s up here though…

    I’m using the same code too but don’t get my public Twitter feed to show up.. I don’t even get the “No items”. 🙁

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘fetch_feed not working’ is closed to new replies.