HTML code working in edit preview, but not in desktop preview

  • Unknown's avatar

    Hello. I keep running into an issue with embedding amazon affilliate links in my blog. I am copying the link from amazon and pasting it into an /html block. When I then click preview in the HTML box the code displays perfectly. But when I update the post and preview in a new tab the code does not work and just displays as text. Here is an example of a code that works in the editor but not on the preview page, <script type=’text/javascript’>
    amzn_assoc_tracking_id = ‘greenpawpets-20’;
    amzn_assoc_ad_mode = ‘manual’;
    amzn_assoc_ad_type = ‘smart’;
    amzn_assoc_marketplace = ‘amazon’;
    amzn_assoc_region = ‘US’;
    amzn_assoc_design = ‘enhanced_links’;
    amzn_assoc_asins = ‘B08J1NDGK5’;
    amzn_assoc_placement = ‘adunit’;
    amzn_assoc_linkid = ‘a3bf812a32edfb9837c61cf0c0ce5ee0’;
    </script>
    //z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US

    WP.com: Yes
    Correct account: Yes

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The html code you can use is very limited. Also Javascript isn’t allowed on the wordpress.com platform unless you upgrade to the Business Plan.

    Also note affiliate linking is restricted on the wordpress.com platform, https://wordpress.com/support/adding-amazon-com-affiliate-links-to-your-wordpress-com-site/

  • The topic ‘HTML code working in edit preview, but not in desktop preview’ is closed to new replies.