您可以通过这种方式将代码标记为head或before body标记。将此代码添加到functions.php
add_action( \'wp_head\', function() {
?>
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date(); (function(){ var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0]; s1.async=true; s1.src=\'https://embed.tawk.to/5b54359ee21878736ba23110/default\'; s1.charset=\'UTF-8\'; s1.setAttribute(\'crossorigin\',\'*\'); s0.parentNode.insertBefore(s1,s0); })();
</script>
<?php
} );
希望有帮助