Im new to PHP, so maybe this is a stupid question. I have some code that should show a livechat for all Wordpress users, in access level 7, and show nothing to people who have another access level.
//Checks if current_user_on_level($level_id) and returns true or false
if ( current_user_on_level(7) ) {
<!--Start of Zopim Live Chat Script-->
<script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
_.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8');
$.src='//v2.zopim.com/?0xObfhlxyhOFFN07eRruAdGFbEDphAiO';z.t=+new Date;$.
type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
</script>
<!--End of Zopim Live Chat Script-->
} else {
// Do nothing
}
I get an error, that say there is an error on the first line where the JS begins.