WordPress Integration
Add Hunch AI chat to your WordPress website using one of these methods.
Method 1: Plugin (Recommended)
The easiest way to add Hunch to WordPress is using a header/footer plugin:
- Install a plugin like "Insert Headers and Footers" or "WPCode"
- Go to the plugin settings
- Paste the Hunch embed code in the Footer section:
<script src="https://cdn.hunchbank.com/embed.js" data-api-key="YOUR_API_KEY"></script>
- Save changes
Method 2: Theme Footer
You can add the code directly to your theme:
- Go to Appearance > Theme Editor
- Select Theme Footer (footer.php)
- Paste the embed code before the closing
</body>tag - Update the file
warning
This method may be overwritten when updating your theme. Consider using a child theme.
Method 3: Custom Plugin
Create a simple plugin to hold your embed code:
- Create a folder in
wp-content/plugins/calledhunch-chat - Create a file
hunch-chat.phpwith this content:
<?php
/*
Plugin Name: Hunch Chat
Description: Add Hunch AI chat widget to your site
Version: 1.0
*/
function hunch_add_embed_code() {
?>
<script src="https://cdn.hunchbank.com/embed.js" data-api-key="YOUR_API_KEY"></script>
<?php
}
add_action('wp_footer', 'hunch_add_embed_code');
- Activate the plugin in WordPress admin
WordPress-Specific Tips
- The chat widget works with popular page builders (Elementor, Divi, Gutenberg)
- It integrates with WooCommerce stores
- No additional configuration needed for most themes
Troubleshooting
- Widget not appearing: Clear your site cache and verify the embed code is in the HTML
- Position issues: Some themes may affect positioning - check your theme's footer output
- SSL required: Ensure your WordPress site uses HTTPS