Why do top and bottom line of widget html code disappear when I save?

  • Unknown's avatar

    Hello. I’m trying to create a link to GiftFly. It should appear on the left side of the page as a blue button.

    I’ve been instructed to add their widget code to a text widget box on my wordpress.com site. I went to appearances and dropped a text box widget into one of the footers. I copied and pasted the entire code, and when I hit the save or save and publish button, the first and last line of the code disappear. And, when I view the site, the code, less the first and last line, displays in the footer. No blue button.

    Please advise. Thank you.

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

  • What is the code that you are trying to use? Can you paste it here? Click the “code” button, paste your code, then click the “code” button again. Then submit your reply.

  • Unknown's avatar
    <script type="text/javascript">
    (function() {
      var po = document.createElement("script");
      po.type = "text/javascript";
      po.async = true;
      po.id = "gfWidgetJS";
      po.src = "//www.giftfly.com/djs/widget?c=153cbd&p=left&h=MBDD850B58B3E93B4";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(po, s);
    })();
    </script>
  • That embed code will not work because we do not allow certain tags on WordPress.com, for security reasons, including JavaScript, Flash, iframe, form, and input tags.

    These restrictions are in place to prevent any disruptions in service due to potentially malicious code.

    You can read more about this here:

    Code

  • The topic ‘Why do top and bottom line of widget html code disappear when I save?’ is closed to new replies.