How to get more than 25 items via Simplepie RSS Feeds?

I have a feed with 50 items but seemingly no matter what I do, it always returns just 25.

$feed->set_item_limit(50); or $rss_items = $rss->get_items(0,50); none of these have any effect nor do I see any reference to the number 25 in the class source, I don’t get it.

The feed is http://gdata.youtube.com/feeds/base/users/silviavaldemoros/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&max-results=50

1 Answer
1

    include_once(ABSPATH.WPINC.'/feed.php');
    $rss = fetch_feed('http://gdata.youtube.com/feeds/base/users/silviavaldemoros/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&max-results=50');
    $maxitems = $rss->get_item_quantity(50);

    $rss_items = $rss->get_items(0, $maxitems);
    print_r($rss_items);

Try this code..

Leave a Comment