Wordpress
Wordpress: How to fix shortcode showing up in the wrong place
add_shortcode(‘custom_shortcode’, ‘custom_function’); function custom_function() { ob_start(); codes…..; $content= ob_get_clean(); return $content; } The reason why we use ob_start() and ob_get_clean() is to buffer the output.