• Resolved dokhacphong

    (@dokhacphong)


    My website run Front-End by Vue JS. When I install your plugin then do shortcode at the footer. It is still working but at the console page have the error. Because we in Vue JS that is require there is not any <script> tag in side of VueJS.

    Could you move your script inside the shortcode form to below body tag?

    Thank youy.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hello @dokhacphong,

    How is this set-up exactly? I’d like to replicate your set-up to do some testing to see how we can best go about this.

    Thread Starter dokhacphong

    (@dokhacphong)

    Hi @dvankooten,

    You can see below link that is my set-up vue js in wordpress.
    Link: http://codepad.org/h5dH4Dqf

    Thank you.

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hello @dokhacphong,

    Here’s how I would go about this:

    
    <?php echo preg_replace( '/<script>.*<\/script>/s', '', do_shortcode("[mc4wp_form]")); ?>
    

    Complete page HTML:

    
    <!doctype html>
    <html>
    <head>
        <?php wp_head(); ?>
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    </head>
    <body>
    <div id="app">
        <div id="layout">
            <header>
            </header>
            <main class="page">
                <h1>this is body</h1>
            </main>
            <footer>
                <?php echo preg_replace( '/<script>.*<\/script>/s', '', do_shortcode("[mc4wp_form]")); ?>
            </footer>
        </div>
    </div>
    <script type = "text/javascript">
      var vue_det = new Vue({
        el: '#app',
        data: {
          message: 'My first VueJS Task'
        }
      });
    </script>
    <?php wp_footer(); ?>
    </body>
    </html>
    

    Hope that helps, good luck!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘run tag inside body.’ is closed to new replies.