Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

//This file is needed to be able to use the wp_rss() function.
include_once(ABSPATH.WPINC.'/rss.php');

function readRss($atts) {
    extract(shortcode_atts(array(
        "feed" => 'http://',
        "num" => '1',
    ), $atts));

    ob_start();
    wp_rss($feed, $num);

    return ob_get_clean();
}

add_shortcode('rss', 'readRss');