我是Wordpress的新手,尝试将聊天泡泡JS脚本放入特定页面。虽然我已经找到了一些答案,但仍然不能完全理解它是如何工作的。
当我试图把下面的代码放在主题中时function.php.聊天泡泡根本没有出现。
我想知道代码中有什么错误。
如果有人能帮我,请提前感谢!
这是我的网站https://staymeander.com/en/meander1948-en/
function wpb_hook_javascript_footer() {
    if(is_page( array(\'3854\',\'253\') ) ) {
    ?>
        <script type="text/javascript">
    (function () {
        var options = {
            line: "//lin.ee/gl1UqsC", // Line QR code URL
            call: "+886225588812", // Call phone number
            call_to_action: "Message us", // Call to action
            button_color: "#FF6550", // Color of button
            position: "right", // Position may be \'right\' or \'left\'
            order: "line,call", // Order of buttons
        };
        var proto = document.location.protocol, host = "getbutton.io", url = proto + "//static." + host;
        var s = document.createElement(\'script\'); s.type = \'text/javascript\'; s.async = true; s.src = url + \'/widget-send-button/js/init.js\';
        s.onload = function () { WhWidgetSendButton.init(host, proto, options); };
        var x = document.getElementsByTagName(\'script\')[0]; x.parentNode.insertBefore(s, x);
    }   
})();
</script>
    <?php
    }
}
add_action(\'wp_footer\', \'wpb_hook_javascript_footer\');