Javascript footer/body

Hey,

Where would I go about putting a javascript code? having a little trouble figuring it out, would it go in the functions.php? do I need a specific code to wrap it to make it work or something? Can’t get it working.

Code below is what im trying to add but cant figure it out

Hi There,

Please add the following code under functions.php file locates in your child theme:

add_action( 'wp_footer', 'print_footer_script' );
function print_footer_script(){
	?>
	<script src="//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=6a0ac5b0-4b84-440a-a1d9-671e03ff4540"></script>
	<?php
}

Let us know how it goes!

looks like its good, Thanks!

Glad to hear it works.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.