shortcode in accordion

edited March 2018 in Shortcodes
Hi there,
I created my own shortcode with php. Now I want to use it in an accordion. This works fine, but now I want to include a different shortcode with do_shortcode and suddenly the shortcode isn't displayed inside the accordion any more, but above it. I want to do something like this:

function own_shortcode {
echo do_shortcode('[button]');
}

Is this even possible?
Thanks for your help!

Comments

  • I figured it out by myself:

    echo do_shortcode('[button]');

    doesn't work, but

    return do_shortcode('[button]');

    does.

    Thanks anyway!
Sign In or Register to comment.