• Resolved russ2204

    (@russ2204)


    How do I insert a script inside a <body> tag using Code Snippets ? I have a scipr which says it needs to be inserted inside the body tag. Can I do this using this plugin ?

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    You absolutely can, using this template:

    add_action( 'wp_footer', function () { ?>
    	<script>
    
    		/* JavaScript code goes here */
    
    	</script>
    <?php } );
Viewing 1 replies (of 1 total)
  • The topic ‘Script in Body’ is closed to new replies.