-
AuthorPosts
-
April 29, 2015 at 1:56 pm #436650
Hey,
In which file should I add this type of code from Amazon:
<!– Start of Amazon Publisher Studio Loader –> <script> window.amznpubstudioTag = “idtrav-20″; </script> <!– Do not modify the following code ! –> <script async=”true” type=”text/javascript” src=”http://ps-us.amazon-adsystem.com/domains/idtrav-20_542c5fc2-ea6d-4026-b90b-1085089239b1.js” charset=”UTF-8″></script> <!– End of Amazon Publisher Studio Loader —>
info from Amazon: We recommend adding the JavaScript to a common page element, like a footer, that is automatically included on all pages of your website.
Thanks
CharlotteApril 29, 2015 at 9:03 pm #437046Hi Charlotte!
Add this to the bottom of your functions.php file.
add_action( 'wp_footer', 'enfold_customization_footer_scripts' ); function enfold_customization_footer_scripts() { ?> insert your code here <?php }
Best regards,
ElliottMay 4, 2015 at 8:55 am #438761Thanks…. I get some error when I am adding this code:
add_action( 'wp_footer', 'enfold_customization_footer_scripts' );
function enfold_customization_footer_scripts() {
?><!– Start of Amazon Publisher Studio Loader –> <script> window.amznpubstudioTag = “idtrav-20″; </script> <!– Do not modify the following code ! –> <script async=”true” type=”text/javascript” src=”http://ps-us.amazon-adsystem.com/domains/idtrav-20_542c5fc2-ea6d-4026-b90b-1085089239b1.js” charset=”UTF-8″></script> <!– End of Amazon Publisher Studio Loader —>
<?php
}May 4, 2015 at 9:13 pm #439313Hi!
What is the error? Send us a link to your page and we’ll take a look.
Best regards,
ElliottMay 5, 2015 at 10:11 am #439597I get this error
May 6, 2015 at 4:15 pm #440420Hey!
Your quotes look weird. Use this instead.
add_action( 'wp_footer', 'enfold_customization_footer_scripts' ); function enfold_customization_footer_scripts() { ?> <script> window.amznpubstudioTag = "idtrav-20"; </script> <script async="true" type="text/javascript" src="http://ps-us.amazon-adsystem.com/domains/idtrav-20_542c5fc2-ea6d-4026-b90b-1085089239b1.js" charset="UTF-8″></script> <?php }
If that’s not working either then it would be best to contact whoever wrote the script for support.
Regards,
Elliott -
AuthorPosts
- You must be logged in to reply to this topic.