Shortcode output appears before post body [duplicate]
I have had this problem before: shortcodes shouldn’t display any content (using print or echo), instead return the content to be outputted. If it’s too much trouble converting all of your output statements, or you need to use a function that will always display the output, you can use output buffering. A buffer will ‘catch’ … Read more