Shortcode output order

Hi! Someone must have asked this before, but I can't find it in the forum.

If I have a page with this content:

My text

It get rendered as:

My text

This is not what I expect. Is it possible to have my own text before the Service Section output?



  • edited July 28
    Hi, @walthy

    Thanks for contacting us!

    This is a minor issue, we are soon going to fix it. If you want we fix this from our end, you can share your admin details at my email(, I will replace one of the theme file. Even if you can do it on your own I will share the code file for replacement in the directory: functions/shortcode/shortcode.php 

  • Hi!

    I looked in the file and saw the problem. The function spicepress_service_shortcode() prints directly to stdout, and does not return anything. I made an quick and dirty solution by defining a new shortcode that captures the output:

    function spicepress_service_shortcode2() {
        return ob_get_clean();
    add_shortcode('spicepress_service2', 'spicepress_service_shortcode2');

    Not well tested, but it seems to work, so I'm good. Thanks for leading me to the code! :-)

  • Glad to know that your problem resolved.

    If you want to update the shortcode.php file so you can update this file code from HERE. By the way, we will update the code of the shortcode.php file in the next version.

This discussion has been closed.