• Resolved thunderclap

    (@thunderclap)


    I’m trying to add an Amazon widget to a WordPress site I admin on Hostgator. I’ve looked at the plug-ins but they seem to all be designed to work as a widget in the sidebar or to allow javascript in a post or page, but I need it in a spot on the front page only. I figured I could add the javascript to the template but it doesn’t seem to work. I was hoping someone here could offer up some advice.

    I’ve tried adding the code to the page, content-home, content-page, and front-page templates but it seems the script is completely ignored.

    Any suggestions would be very much appreciated.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Theme Author ThemeAWESOME

    (@tsquez)

    can you provide the javascript that you are wanting to use please?

    Thread Starter thunderclap

    (@thunderclap)

    The code is:

    <SCRIPT charset="utf-8" type="text/javascript" src="https://ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Frepjactheofff-20%2F8003%2Fa3912a82-4bf2-4020-a150-ecf8763418c4&Operation=GetScriptTemplate"> </SCRIPT> <NOSCRIPT><A HREF="https://ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Frepjactheofff-20%2F8003%2Fa3912a82-4bf2-4020-a150-ecf8763418c4&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT>

    Thread Starter thunderclap

    (@thunderclap)

    You actually contacted me via email but I didn’t want to continually bother you with support questions directly. ?? If you’d prefer continue via email instead of here my email was m*******[email protected]

    Theme Author ThemeAWESOME

    (@tsquez)

    Yes I remember you and I do not see what the problem is. I used the code you provided above, added it to front-page.php and it works fine. I see the list of books that scrolls on its own.

    What I did was open up front-page.php and underneath the following line:

    <div id="content" class="medium-12 large-12 columns" role="main">

    I pasted the code from above and it looks like this:

    <div id="content" class="medium-12 large-12 columns" role="main">
    
    <SCRIPT charset="utf-8" type="text/javascript" src="https://ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Frepjactheofff-20%2F8003%2Fa3912a82-4bf2-4020-a150-ecf8763418c4&Operation=GetScriptTemplate"> </SCRIPT> <NOSCRIPT><A HREF="https://ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Frepjactheofff-20%2F8003%2Fa3912a82-4bf2-4020-a150-ecf8763418c4&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT>

    Works fine, so I have no idea what the issue is you are having.

    Theme Author ThemeAWESOME

    (@tsquez)

    I have even added it here so you can see that its working properly:

    https://yourthemedemo.com/

    Thread Starter thunderclap

    (@thunderclap)

    Well it seems part of the problem is I use Chrome as my default and Chrome doesn’t like the script since Chrome no longer supports NPAPI. So I tried Firefox on your site and it does work, but when I try it on my site it doesn’t. I wonder if my host is somehow blocking the script?

    Theme Author ThemeAWESOME

    (@tsquez)

    I use nothing but chrome and it works fine. Have you tried disabling any plugins to see if one of them is causing a conflict maybe?

    Thread Starter thunderclap

    (@thunderclap)

    Well I’m not sure what’s going on with Chrome since I can’t see the widget on your site in it, only Firefox. As for my host it looks like they don’t allow Javascript on shared domains as it’s too resource intensive, so that explains why it’s not working on my end. Thanks for looking into it though. Very much appreciate it.

    Theme Author ThemeAWESOME

    (@tsquez)

    I have used Hostgator for many, many years (until recently as I switched to Bluehost) and never had a problem with running java scripts of any kind on any site I owned or created for clients.

    And you may want to check your settings in Chrome.

    Sorry its not working out for you, but the script does work like it should alongside the theme.

    Thread Starter thunderclap

    (@thunderclap)

    Please don’t take anything I’ve said as something negative about your theme. Quite the contrary. I actually have purchased several add-on’s for it on my personal site; I think it’s a terrific theme, modern and easy to use.

    As for my problem I can see the code displayed on your site using Firefox but not Chrome (this is on my personal machine at home and my Mac at work… Chrome just doesn’t like it). So it’s nothing with your theme but something else. Your theme is fine, and I didn’t mean to imply that it was at fault in any of this.

    Theme Author ThemeAWESOME

    (@tsquez)

    Oh no sir on the contrary, nothing in this conversation has been taken in a negative way. Quite the contrary. And trust me I never thought you were implying it was WP-Forge’s fault.

    However I do have a suggestion for you, yo may want to contact Hostgator and see if they are in fact blocking that script and if they are then maybe they can do what is called white listing the domain to use the script.

    And thanks for choosing WP-Forge. If you can please leave a rating and review.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Amazon Associate Widget Javascript’ is closed to new replies.