Javascript appears on page
-
I got the code for the Follow button from the generator. Upon adding it as a Custom HTML widget, it resulted in the following code:
<aside id="block-45" class="widget widget_block"><a class="wordpress-follow-button" data-blog="https://melange.dmaculate.me/home" data-lang="en">Follow dMaculate.melange on WordPress.com</a> (function(d){var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');p.type = 'text/javascript';p.async = true;p.src = '//widgets.wp.com/platform.js';f.parentNode.insertBefore(p,f);}(document));</aside>
This is what appears on the page:
Follow dMaculate.melange on WordPress.com (function(d){var f = d.getElementsByTagName(‘SCRIPT’)[0], p = d.createElement(‘SCRIPT’);p.type = ‘text/javascript’;p.async = true;p.src = ‘//widgets.wp.com/platform.js’;f.parentNode.insertBefore(p,f);}(document));
Why is the JavaScript from the
<script />
tag rendering on the page? How can I fix it so that it renders the Follow button?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Javascript appears on page’ is closed to new replies.