Install the chat widget on WordPress
-
In the agent app, open Settings > Website widget and copy the install code.
Install code <!-- Click2Reply chat widget --><script>window.__c2r = {"license":12345678};;(function(w,d,n){if(w[n])return;var q=[],f=function(m){return function(){q.push([m,[].slice.call(arguments)])}};w[n]={_q:q,on:f("on"),once:f("once"),off:f("off"),call:f("call"),get:function(){throw new Error("[Click2Reply] get() is available after the widget loads")},init:function(){var s=d.createElement("script");s.async=!0;s.src="https://w.click2reply.com/w.js";d.head.appendChild(s)}};!(w.__c2r&&w.__c2r.async_init)&&w[n].init()})(window,document,"Click2Reply");</script><noscript><a href="https://w.click2reply.com/page?license=12345678" rel="nofollow">Chat with our support team</a></noscript> -
In your WordPress admin, open Appearance > Theme File Editor, or a header and footer plugin if your site uses one.
-
Paste the code into the site-wide footer, just before
</body>. In the theme file editor that isfooter.php; in a plugin it is the box for code in the footer or at the end of the body. -
Save, then open your site to see the chat button.
A block theme
Section titled “A block theme”Block themes have no footer.php. Use a header and footer plugin, which adds the code to every
page whatever the theme.
Caching plugins
Section titled “Caching plugins”A page cache serves the old pages until it is cleared. Clear it after you add the code, and leave the widget’s script out of any “combine” or “defer JavaScript” option: the code already loads without blocking the page.