Skip to main content

Overview

Add your Invent AI assistant to any WordPress site with a simple floating bubble. Your visitors can chat with your assistant without leaving your website.

Quick Installation

The easiest way to add Invent to your WordPress site is by adding the bubble code to your theme.
1

Install Code Snippets Plugin

Install the free Code Snippets plugin from the WordPress plugin directory, or use any custom code plugin you prefer.
2

Add the Bubble Code

Create a new snippet and paste this code:
Replace ast_YOUR_ASSISTANT_ID with your actual assistant ID from the Invent dashboard.
3

Save and Activate

Save the snippet and activate it. The bubble will now appear on all pages of your site.

Method 2: Edit Theme Files Directly

Make sure to use a child theme to prevent losing your changes when the theme updates.
1

Open functions.php

Navigate to AppearanceTheme File Editor and open your theme’s functions.php file.
2

Add the Code

Add this code at the end of the file:
3

Update File

Click Update File to save your changes.

Method 3: Using a Page Builder

If you’re using Elementor, Divi, or another page builder:
  1. Add a Custom HTML or Code widget to your header/footer template
  2. Paste the bubble code:

Customization

Change Button Colors

Match the bubble to your WordPress theme:

Show Only on Specific Pages

Show the assistant only on certain pages or post types:

Hide on Specific Pages

Exclude the assistant from certain pages:

User Authentication

Security Requirement: When using any user-* attributes (user-id, user-name, user-avatar), you must also provide user-hash. Both user-id and user-hash must be provided together, or neither should be provided. The user-hash must be generated on your backend using HMAC-SHA256 with your assistant’s secret key. Never expose the secret key to the client.
Pass WordPress user information to Invent for personalized experiences:

WooCommerce Integration

Pass product information to your assistant for shopping assistance:

Troubleshooting

Possible causes:
  • Code not added correctly
  • JavaScript conflicts
  • Theme compatibility issues
Solutions:
  • Check browser console for JavaScript errors
  • Temporarily disable other plugins to check for conflicts
  • Verify the code is in the wp_footer hook
  • Clear WordPress cache if using a caching plugin
Possible causes:
  • Code added in multiple places
  • Theme already includes footer scripts
Solutions:
  • Remove duplicate code snippets
  • Use only one integration method
Possible causes:
  • Theme CSS interfering with button
  • Z-index conflicts
Solutions:
  • Add custom CSS to your theme
  • Adjust button positioning if needed
The bubble works seamlessly with popular WordPress plugins:

WooCommerce

Perfect for e-commerce support and product questions

Elementor

Add via Custom HTML widget in header/footer templates

WPML

Works with multilingual sites automatically

Yoast SEO

No impact on SEO or page speed

Best Practices

  • Store your secret key in wp-config.php using define() for security
  • Use a child theme to prevent losing changes during theme updates
  • Test on staging environment before deploying to production
  • Consider page load times when adding authentication logic