• Hello everyone, I am trying to add a shortcode (I’m doing this for the first time in my life). The content of the shortcode shows up above the post content, and I want it to be at another place (below the post content).

    I already read this and this topics, and so far I have the following code, which hopefully doesn’t crash my site, but still shows up above the content (in the wrong place):

    function simplybook_script () {?>
    <script type="text/javascript" src="https://wanadiis.simplybook.me/iframe/pm_loader.php?width=700&url=https://wanadiis.simplybook.me&theme=&layout=widget&timeline=modern"></script>
    <?php
    return;
    ob_start();
    add_simplybook_widget ();
    $output_string=ob_get_contents();;
    ob_end_clean();
    return $output_string;
    }
    add_shortcode ('simplybook_widget', 'simplybook_script');

    Please help what’s wrong with the code? Thank you in advance!

    [bump moderated]

  • The topic ‘Shortcode displays above the post content’ is closed to new replies.