I've created my own shortcode. I'm unable to share the code unfortunately ;/
When I use it on my pages it behaves strange. It always has the highest priority. I mean something like that in page editor:
Outputs on the page:
< shortcode contents > Text
And this in page editor:
[shortcode] Text [shortcode]
< shortcode contents > < shortcode contents > Text
So I'm unable to put anything before and between my shortcodes.
To say more, my shortcodes use a few ifs, foreachs and a loop (they're grabbing and displaying data from custom post type).
Any ideas why it happnes?
OK, so I've been using echoes instead of return. My bad. Is there any way of return my whole function without editing every single line and adding $output etc.?