Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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&#8221; 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
    Charlotte

    #437046

    Hi 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,
    Elliott

    #438761

    Thanks…. 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
    }

    #439313

    Hi!

    What is the error? Send us a link to your page and we’ll take a look.

    Best regards,
    Elliott

    #439597

    I get this error

    error

    #440420

    Hey!

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.