Get last X number of posts from a selected RSS feed.
<?php jp_get_rss_feed_items("My feed URL", 10); ?>
will return the last ten items from "My feed URL".
<?php jp_get_rss_feed_items("My feed URL"); ?>
will return the last five items.
Use an array and a foreach loop:
<?php
// create array
$feedslist = array(
"My feed URL number one",
"My feed URL number two",
"My feed URL number three"
);
// loop through array and call plugin
foreach ($feedslist as $item) {
jp_get_rss_feed_items($item)
}
?>
This will list the items group from each feed in its own unordered list.
Use an array:
<?php
// create array
$feedslist = array(
"My feed URL number one",
"My feed URL number two",
"My feed URL number three"
);
// get random index from array member
$item = array_rand($feedslist, 1);
// pass randomly selected item to plugin
jp_get_rss_feed_items($feedslist[$item])
}
?>
This selects one member randomly and passes it to the plugin.
Requires: 2.9 or higher
Compatible up to: 3.0.5
Last Updated: 2010-12-21
Downloads: 1,040
Got something to say? Need help?