Skip to content

Instantly share code, notes, and snippets.

@Pleiades
Created November 15, 2012 22:42
Show Gist options
  • Save Pleiades/4082004 to your computer and use it in GitHub Desktop.
Save Pleiades/4082004 to your computer and use it in GitHub Desktop.
Embed an RSS Feed
include_once(ABSPATH.WPINC.'/rss.php');
function readRss($atts) {
extract(shortcode_atts(array(
"feed" => 'http://',
"num" => '1',
), $atts));
return wp_rss($feed, $num);
}
add_shortcode('rss', 'readRss');
[rss feed="http://feeds.feedburner.com/webdesigntutsplus" num="3"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment