Support » Fixing WordPress » Amazon referral link creation

  • Resolved quiltin_maniac


    Disclaimer: Yes, I’ve searched the archives but I’m a new WordPress user, and it was all Greek to me!

    I am using wordpress for a book blog and I’d like to put my amazon referral links into my posts. When I do it with the code amazon provides, the navigation on the right side of my page, and any content (including the comments links, and the WordPress info at the bottom of the page) after I paste the Amazon code in, disappears!

    If there is a link to this that explains for new users how to do this, I’d greatly appreciate it, but in searching the site and looking for it, I wasn’t able to find the specific instructions I need on how to embed my referral links. (I confess to not knowing how to use plugins, so I was hoping to just be able to use the code Amazon provides…)

    Thanks in advance,

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    It would help to see a link to a page with the problem in action, as well as a link to the page without the problem code.

    I can cut and paste amazon code into my posts just fine, although their code doesn’t validate without minor adjustments.

    Ok, here’s the page when it’s working, without the amazon referral code;

    And once I post in the amazon-provided code, it does this (I posted it in the HTML editor in wordpress, between paragraph tags);

    Note that the right navigation disappears. The amazon code looks like this (brackets removed);
    iframe src=(amazon link)
    style=”width:120px;height:240px;” scrolling=”no” marginwidth=”0″ marginheight=”0″ frameborder=”0″
    and then it ends the iframe.
    I tried putting the code into table cells, and everything, and it always just burps and the page ends immediately after the amazon image and link. The entry information, the comment/response boxes, and the automatic footer disappear.

    I guess the right-hand navigation only works from the main blog page, so that’s
    Orignally, the right side had navigation but once I published the page with the amazon box, the nav. (my extra pages and links) is removed.

    So with the latest entry, “Testing,” posted, the viewer has no way now to get to any other pages in my blog.

    Let me know if that makes it any clearer… Thanks!

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Ahh. You can’t close an iframe that way. It has to be (iframe)(/iframe). The single close at the end of the tag won’t fly in most browsers. I think the editor is automatically changing it from that because it’s “empty”. Still, that won’t work for iframes.

    Try disabling the “Visual Rich Editor” in your Users options and then using the non-wysiwyg editor instead.

    And if/when you get sick of that stuff, feel free to try CG-Amazon. All you do is something like:

    Well, and turn on CG-Inline as well to catch that syntax, and set some preferences in cga-config.php… 😉

    The result can be an image, a link, with or without current pricing, etc. All live updated every 24h or so (configurable).

    I personally like it better than embedding the Amazon stuff, but that’s bc I like to control my links, not let Amazon control them! 😉 And, this way, I can change the default for ALL my posts at one time, and not have to go edit them one by one.


    I am trying to place amazon ads and a technorati link in the right hand column below the blog roll, etc. I do not find the instructions for this. Any help is appreciated.


    Otto: Yes,the /iframe is there, I just didn’t put the text into my message. It does NOT close the iframe though. I was using the HTML code, not the wysiwig. I coded a table in html, put the iframe into its own cell (ending it properly of course) and closing the table cell and making another one for my content – NOTHING! Argh. I could get some content in before the iframe, but it still lost the rest of my page content. The iframe just kills every single thing after the iframe close. (/iframe) I’ve tried putting it in its own table, too, doesn’t work. It just doesn’t read a single bit of code after the iframe close…. ?! It works on a regular webpage, just not in my blog entries. I can make a webpage where it works perfectly,

    (If you view the source there, in the first data cell you can see the entire code for the Iframe that amazon gave me – I just pasted that into the cell.)

    David – Can you tell me more about CG-Amazon? All I need is to know the basics, and I can get it going, how can I find out more about it? (Originally I’d coded the amazon link myself anyways, before I was an affiliate, but when I joined the affiliate program, it said some crap like “AND you’ve got to use our code or your web page will explode and we’ll channel all your money to our own bank accounts mwa ha ha” so I just wasn’t sure how to modifity the code without them getting my money… 😉

    Thanks tons everybody,

    CG-Amazon is a powerful plugin that simplifies interfacing with Amazon on a number of levels.

    At its most basic, in combination with CG-Inline, it allows for embedded product links within posts. A minor step more complex, it allows for wishlists or other explicit product lists in sidebars.

    Adding in the WP administration panel, you can create your own ‘database’ of Amazon products, tagged with you choice of categorization, and then display a particular category in a sidebar (such as a ‘Now Reading’ list). It also has a built-in search facility, to make it easy to find and add products to your personal database.

    Lastly, getting into more ‘tricky’ stuff, you can have a section of your site that displays your product database as a mini ‘storefront’. Not a real storefront script, just an ‘integration’ of your WP theme with simple list paging and per-product page display of your product entries. Check out my ‘products’ section — it’s not pretty, but I’ve spent NO time on it. 😉

    CG-Amazon and CG-Inline are part of my CG-PowerPack, which includes all my (major) plugins in one package. Feel free to contact me via my website if you have questions.


    I’ve looked at the CG Power pack, but I don’t think that I want to invest the time learning how to install and work it. It’s all Greek – erm, Code – to me….

    If anybody has had success putting just the Amazon-provided iframe code into their blog, please let me know. I think I will go with the double-link option as a workaround, but I’m not quite delighted with that resolution.

    I’ve removed the page that had the error on it, but I’m still getting a lot of attempts to reach that page – any way I can edit the link out of my earlier post?

    Many thanks,

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Amazon referral link creation’ is closed to new replies.