So I wanted to add a HTML widget in my sidebar using the “Text with title” element, but I can’t get it to work…
I added this code:
<script type=”text/javascript”><br />baseUrl = “https://widgets.cryptocompare.com/”;<br />var scripts = document.getElementsByTagName(“script”);<br />var embedder = scripts[ scripts.length – 1 ];<br />(function (){<br />var appName = encodeURIComponent(window.location.hostname);<br />if(appName==””){appName=”local”;}<br />var s = document.createElement(“script”);<br />s.type = “text/javascript”;<br />s.async = true;<br />var theUrl = baseUrl+'serve/v1/coin/multi?fsyms=BTC,ETH,XRP,BCH,LTC,DASH,XEM,XMR,NEO,IOT&tsyms=EUR,USD';<br />s.src = theUrl + ( theUrl.indexOf(“?”) >= 0 ? “&” : “?”) + “app=” + appName;<br />embedder.parentNode.appendChild(s);<br />})();<br /></script>
In the “Edit Content” Tab, but it dosen’t seem to work… It worked once, but now it dosent show again… What is going on here?
Thanks
Hello alex,
First of all, please notice that code is not an HTML code, sorry! It’s javascript! We have no idea about this code and we do not know what exactly should have to happen with this code, sorry! If you want to add some JS code through our theme, you should add it in our custom box area, like here -> https://www.screencast.com/t/mSn0sEiuN91 Check it with the vendor of this code and request some help from they.
Thanks for your understanding!
OK, I will add it there. But in the “raw HTML” element the code works… How can I add that code to my sidebar than?
Sometimes I can add it with “Text with title” too, but it disappears after some time..
Hello alex,
Please notice that the Text with Title block does not allow the js code, sorry! You should place it in Javascript custom area but please notice that we cannot provide support for untested code, sorry! Notice that code does not come from our theme and we cannot provide support for this, sorry!
Thanks for the message!
But it works now? Is it possible to get that code in the sidebar area? If yes, how would you do it?
-
This reply was modified 8 years by
alexvaltin.