WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode displays above the post content (1 post)

  1. gella2002
    Member
    Posted 5 months ago #

    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="http://wanadiis.simplybook.me/iframe/pm_loader.php?width=700&url=http://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]

Reply

You must log in to post.

About this Topic

Tags

No tags yet.