get_item_quantity returns 0
-
I’m using the fetch_feed function to pull info from an RSS. However, the get_item_quantity always returns 0, despite there being at least 1 item in the feed. I’ve checked and the feed is valid, so I’m a little confused as to where the problem is occurring. Here is a look at my code:
include_once(ABSPATH . WPINC . '/feed.php'); $rss = fetch_feed('https://talkradiox.com/station/archives/564/feed'); $maxitems = $rss->get_item_quantity(1); $rss_items = $rss->get_items(0, $maxitems); if ($maxitems != 0) { foreach ($rss_items as $item) : do something endforeach; } else { do something else }
- The topic ‘get_item_quantity returns 0’ is closed to new replies.