How to add an AI chatbot to a WordPress site
Paste the script tag into your site's footer. The easiest way is a "header and footer code" plugin such as WPCode, so you don't have to touch theme files. Get a key at /get-api-key first.
- In WordPress admin, install and activate a header/footer code plugin.
- Open its Footer box and paste:
<script src="https://onelinechat.com/widget.js" data-key="olc_pub_YOUR_KEY" async></script>
- Save, then reload your site. The chat bubble appears in the bottom-right corner.
Notes
- Comfortable editing themes? In a classic theme, put the line before
</body>in the child theme'sfooter.php. Block themes don't have that file, so use the plugin instead. - Using a page-cache plugin? Purge it once after saving, or logged-out visitors keep getting the old page.