Possible Duplicate:
Shortcode always displaying at the top of the page
I've read what others have said here and at wordpress, but their answers don't fix my problem. Here is a very simple bit of code that reflects the problem (note, this is not the code I'm actually using, but a simple example that shows how the code works)..namely, regardless of anything you put above the shortcode (like a description), the shortcode always goes first. I've tried using return instead of echo, but that doesn't work.
add_shortcode('my_shortcode','my_shortcode_function');
function my_shortcode_function{
my_function;
}
function my_function {
for ($i=1;$i<=4;$i=$i+1){
echo 'hello';
}
}
Can anybody see what I might be doing wrong? Thanks for any help you can provide.