Elementor page builder shortcode issue Elementor page builder shortcode issue wordpress wordpress

Elementor page builder shortcode issue


This answer on an unrelated site helped me solve this Elementor issue. https://wp-types.com/forums/topic/shortcode-output-showing-up-in-the-wrong-place/

I just had to include ob_start(); and $content = ob_get_clean(); return $content; in my function. Here is what it looks like:

function custom_author_link_function() {        ob_start();        coauthors_posts_links();        $content = ob_get_clean();        return $content;}add_shortcode('custom_author_link', 'custom_author_link_function');