Shortcode: Embeddable RSS feed reader

Add following code where you want to display it.

Usage

[rss feed="http://feeds2.feedburner.com/Catswhocode" num="5"]

Add following snippet to “functions.php”

Snippet

include_once(ABSPATH.WPINC.'/rss.php');
add_shortcode('rss', 'readRss');
function readRss($atts) {
    extract(shortcode_atts(array(
	"feed" => 'http://',
      "num" => '1',
    ), $atts));

    return wp_rss($feed, $num);
}

Courtesy: Smashing Magazine

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>