How to Add an AI Chatbot to WordPress
WordPress powers over 40% of the web. Adding a Tuqlas AI chatbot to WordPress takes just a few lines in your theme's functions.php — no plugin needed.
01
Create a chatbot on Tuqlas
Sign up at tuqlas.com, create a chatbot, and copy your embed key.
02
Add the script via functions.php
Use wp_enqueue_script to load the Tuqlas embed script in your theme's footer. Add the data-key attribute for your chatbot.
03
Save and refresh
The chat widget appears on every page of your WordPress site immediately.
functions.php
function tuqlas_embed_script() {
wp_enqueue_script(
'tuqlas-embed',
'https://tuqlas.com/chatbot.js',
array(), // no deps
null,
true // in footer
);
wp_script_add_data('tuqlas-embed', 'defer', true);
}
add_action('wp_enqueue_scripts', 'tuqlas_embed_script');💡 Tip
If you're using a page builder like Elementor or Divi, you can also paste the script tag directly into a Custom HTML widget.
Ready to add a chatbot to WordPress?
Create your chatbot and get your embed key in under a minute.