How to Embed RSS Feed Entries in WordPress Posts

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:

{code type=php}
//This file is needed to be able to use the wp_rss() function.

function readRss($atts) {
“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:
{code type=html}
[rss feed=”” num=”5″]

It will look a little something like this: