Integrate your AI chatbot with WordPress using functions.php or a custom plugin approach.
Add code directly to your theme's functions.php file for quick setup.
Copy the code to your theme's functions.php file and update the configuration.
// Add to your theme's functions.php file
function add_dot_chatbot() {
?>
<script>
window.DOT_CHATBOT = {
dotId: 'your-dot-id',
position: 'bottom-center',
welcomeMessage: 'Hi! How can I help you today?',
hints: ['How can I help you?', 'Ask me anything!']
};
</script>
<script src="https://cdn.d0t.my/dot.js" async></script>
<?php
}
add_action('wp_footer', 'add_dot_chatbot');
Warning: Always backup your functions.php file before making changes. Consider using a child theme to prevent losing changes during theme updates.
Choose your preferred method above to add Dot to your WordPress site, or explore other integration options.