WordPress Integration

Add Dot to Your WordPress Site

Integrate your AI chatbot with WordPress using functions.php or a custom plugin approach.

1

Choose Integration Method

Add code directly to your theme's functions.php file for quick setup.

Quick and simple setup
No plugin required
Easy to customize
2

Add the Code

Copy the code to your theme's functions.php file and update the configuration.

Replace placeholder values
Test on staging first
Backup before changes

Functions.php Code

// 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.

Best Practices

Development

Use a child theme for functions.php modifications
Test on staging environment first
Create a custom plugin for production

Security

Use WordPress hooks properly
Sanitize and escape output
Validate user inputs

Ready to integrate?

Choose your preferred method above to add Dot to your WordPress site, or explore other integration options.

Ask me anything