Text Widget Issue
-
Hi, I have been trying to add HTML code to the text widget but to no avail.
For example, I tried to add a Google+ widget with the following code:
<!– Place this tag where you want the widget to render. –>
<div class=”g-page” data-width=”290″ data-href=”//plus.google.com/u/0/100837950628366369645″ data-layout=”landscape” data-rel=”publisher”></div><!– Place this tag after the last widget tag. –>
<script type=”text/javascript”>
(function() {
var po = document.createElement(‘script’); po.type = ‘text/javascript’; po.async = true;
po.src = ‘https://apis.google.com/js/platform.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(po, s);
})();
</script>But the widget strips away certain portions to this:
<!– Place this tag where you want the widget to render. –>
<div class=”g-page”></div><!– Place this tag after the last widget tag. –>
(function() {
var po = document.createElement(‘script’); po.type = ‘text/javascript’; po.async = true;
po.src = ‘https://apis.google.com/js/platform.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(po, s);
})();Please help to provide the correct code I should be adding into the widget. Thanks!
The blog I need help with is: (visible only to logged in users)
-
Hi there,
I’m sorry, but Javascript is not allowed on WordPress.com due to security reasons. You can see accepted code here:
However, you can Connect a Google+ Page to your Blog using that support guide.
Let me know if you have any questions with this!
-
Hi, thanks for the reply. I have already connected my google+ page to my blog but I would like to add the widget onto my blog. How can I do that if I can’t paste the code google+ provided?
-
Currently we don’t have a Google+ widget, but what you can do is add a Google+ icon and link that back to your Google+ profile as seen here:
- The topic ‘Text Widget Issue’ is closed to new replies.