If you want to list some of the latest posts from another site within one of your WordPress posts or pages, here’s a handy way to do it using a shortcode. First, add this to your functions.php file:
//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)); return wp_rss($feed, $num); } add_shortcode('rss', 'readRss');
After adding that you can now use a shortcode to embed RSS:
[rss feed="http://wpmu.org/feed" num="5"]
It will look a little something like this:

Source: CatsWhoCode.com







Hiya,
thats a great tip, but the feed always seems to be at the top of the post, is there a way of changing this?
http://music-movement.com/blog/2010/05/19/aryn-michelle/
cheers
We do something similar. The only real difference though is we include a check to make sure the enduser isn’t pulling in their own RSS feed. As noted earlier, that may cause an issue.
I’d been trying to find something to embed the category RSS feeds from my WordPress website into pages of the website, so when I saw your post, I was excited. But when I tried it (copied your code verbatim to the bottom of the functions.php file) and added that one line of code to the bottom of one of my pages, I got this:
//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)); return wp_rss($feed, $num); } add_shortcode(‘rss’, ‘readRss’);
Warning: Cannot modify header information – headers already sent by (output started at /home/raider10/public_html/wp-content/themes/voodoo-dolly/functions.php:51) in /home/raider10/public_html/wp-includes/pluggable.php on line 890
What am I missing?
Never mind — I got it to work. But the same question — how do I get it somewhere else on the page other than the top?
I am receiving the same error as Chris. What did he do to correct this? I guess I’ll have to mess with it a bit more. I already know how to add an rss feed to a page but it appears that this will allow me to add to a post, which is precisely what I want to do.