Shortcode echoing, not returning
-
The shortcode is echoing content (so the output is out of order) instead of returning.
I fixed this by putting ob_start(); right before the outputted html markup in the shortcode function; and a $return = ob_get_clean(); at the end of the html markup.
then I added return $return; at the end of the shortcode function. Everything is great now.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Shortcode echoing, not returning’ is closed to new replies.