Home Forums Weaver Xtreme Theme Adding a Javascript to Widget?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #17558
    MarkieMadden
    Participant

    Hello there. I’m trying unsuccessfully to add an Amazon.uk Affiliate  widget to my WordPress-powered site hosted through Bluehost. I’m using Weaver Xtreme theme and I love it. But even though I copy and paste the code from Amazon, it doesn’t show up in the widget area. The code begins with <script and then type=text/javascript so I assume it’s Java and not regular html. Why is is not showing up? Is there something I need to do in my theme in order to show Java?

    #21051
    scrambler
    Moderator

    Without knowing what you are pasting it is hard to know.

    You can first try in in a test page based on the default template, paste the whole code as provided in the content editor while in TEXT mode, and make sure to check the options “Allow Raw HTML and script” in the page options.

    If it is a script, it will be inside script tags like

    <script type=text/javascript>The content of the script </script>

    Which is the valid HTML syntax to insert a script

    #21052
    MarkieMadden
    Participant

    Thank you Scrambler. I tried that, and it worked…once. Now it’s not at all except the widget title. Here’s part of the code I’m trying to insert. I took out the part that I thought was sensitive information and I didn’t know how it will show in the post anyway.

    <SCRIPT charset=”utf-8″ type=”text/javascript” src=”http://ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&MarketPlace Operation=NoScript”>Amazon.co.uk Widgets</A></NOSCRIPT>
    #21053
    scrambler
    Moderator

    Your syntax appears to be wrong, you have a closing link tag (</a>) without an open one.

    Anyway, if it is not working, either the code syntax is wrong or the script is not working, and in both cases, you need to verify the code you are using with its provider

    #21054
    MarkieMadden
    Participant

    Well, as I said, that wasn’t the whole code, I took out some of the middle.

    BUT, I can get it to work in a widget (for some reason it’s working now), however, that kills my https security on the site. I tried changing the Amazon links in <a href= to both read https instead of http, but it still doesn’t bump up my security. Any ideas?
    #21055
    Weaver
    Keymaster

    An easy and safe way to deal with http:// vs https:// is to simply use // only.  E.g., href=”https://example.com&#8221; can be expressed as href=”//example.com”

    #21056
    MarkieMadden
    Participant

    Weaver, interesting. I think I might have to give that a try. I’d love to be able to include my Amazon affiliate codes. I’ve not made anything off of them as of yet but they’ve only been posted on my old Blogger, which I’m no longer using. But I certainly won’t make anything if I don’t post them!

    #21057
    MarkieMadden
    Participant

    Still not working right. There’s only two links in this JavaScript: one is a src= link, the other is an a href. I haven’t studied Java yet but it’s next in my list. I’ve also alerted Amazon to this so I’m interested to see what they say.

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