Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix ‘baseUrl’ is not defined

Discussion in 'Misc WordPress Requests' started by miselik, Jan 1, 2018.

  1. miselik


    ‘baseUrl’ is not defined, by miselik

    Hello all!

    I am having trouble with implementing one WP plugin. This is the plugin site:


    And this is the plugin I have inserted into Custom HTML widget field:

    <script type=”text/javascript”>
    baseUrl = ‘https://widgets.cryptocompare.com/’;
    var scripts = document.getElementsByTagName(‘script’);
    var embedder = scripts[ scripts.length – 1 ];
    (function (){
    var appName = encodeURIComponent(window.location.hostname);
    var s = document.createElement(‘script’);
    s.type = ‘text/javascript’;
    s.async = true;
    var theUrl = baseUrl+’serve/v1/coin/multi?fsyms=BTC,XRP,ETH,BCH,ADA,LTC,IOT,XEM,DASH,XMR&tsyms=USD,EUR,BTC,CZK’;
    s.src = theUrl + ( theUrl.indexOf(‘?’) >= 0 ? ‘&’ : ‘?’) + ‘app=’ + appName;

    WP gave me a few code errors, so I corrected them, but there is one last error I cant seem to correct, it is baseUrl error:

    baseUrl = ‘https://widgets.cryptocompare.com/’;

    var theUrl = baseUrl+’serve/v1/coin/multi?fsyms=BTC,XRP,ETH,BCH,ADA,LTC,IOT,XEM,DASH,XMR&tsyms=USD,EUR,BTC,CZK’;

    These two code strings give me this error: “‘baseUrl’ is not defined”

    I suppose WP doesnt know this command and I should replace it with something else, but I am clueless. Searched the web for several hours and no answers anywhere. I have also contacted the plugin maker, but its DIY and I dont think they will be able to answer my question.

    Thank you all for help and wish you happy New year!

    ‘baseUrl’ is not defined

Share This Page

Monarch Social Sharing Plugin