Skip to main content

WordPress Integration

Add Hunch AI chat to your WordPress website using one of these methods.

The easiest way to add Hunch to WordPress is using a header/footer plugin:

  1. Install a plugin like "Insert Headers and Footers" or "WPCode"
  2. Go to the plugin settings
  3. Paste the Hunch embed code in the Footer section:
<script src="https://cdn.hunchbank.com/embed.js" data-api-key="YOUR_API_KEY"></script>
  1. Save changes

You can add the code directly to your theme:

  1. Go to Appearance > Theme Editor
  2. Select Theme Footer (footer.php)
  3. Paste the embed code before the closing </body> tag
  4. 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:

  1. Create a folder in wp-content/plugins/ called hunch-chat
  2. Create a file hunch-chat.php with 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');
  1. 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