0

This is my current code:

<script src="http://unibet-affiliate.enetscores.com/xjs/hour/theme/affiliate/361/client"></script>
<script>
__initLivescore({"c1":"F0F0F0","c2":"BABCC3","c4":"FFFFFF","c5":"FFFFFF","c6":"C90000","affiliate_id":"0","menu":"1","sportFK":"1","odds":"decimal","lang":"3","timezone":"AUTO","selected_tab":"all"});
</script>

It is possible to use wp_enqueue_script for this code?

Thank you so much!

-1

put these

__initLivescore({"c1":"F0F0F0","c2":"BABCC3","c4":"FFFFFF","c5":"FFFFFF","c6":"C90000","affiliate_id":"0","menu":"1","sportFK":"1","odds":"decimal","lang":"3","timezone":"AUTO","selected_tab":"all"});

code in a js like demo.js file. and then use wp_enqueue_scripts and enqueue this file

wp_enqueue_script( 'script-name1', 'http://unibet-affiliate.enetscores.com/xjs/hour/theme/affiliate/361/client');
wp_enqueue_script( 'script-name2',  plugin_dir_path( __FILE__ ) . '/demo.js', array(), '1.0.0', true );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.