Hi
I have been reading this and many more and I am having the same problem. My shortcode is displaying at the top.
However, I cannot find how to change the echo to a return as it already is using return.
It is a basic RSS reader that uses the built-in wp_rss function.
I found it on a site and it is working, but as mentioned displaying it aty the top.
Here is the code added to the functions.
//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" => 'https://',
"num" => '1',
"echo" => '0',
), $atts));
return wp_rss($feed, $num);
}
add_shortcode('rss', 'readRss');
as you can see, it already uses return. Any advice would be greatly appreciated.
Thanks
Paddy