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.Method 1: Using a Plugin (Recommended)
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 Appearance → Theme 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:- Add a Custom HTML or Code widget to your header/footer template
- 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.WooCommerce Integration
Pass product information to your assistant for shopping assistance:Troubleshooting
Bubble not appearing
Bubble not appearing
Possible causes:
- Code not added correctly
- JavaScript conflicts
- Theme compatibility issues
- 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
Button appears multiple times
Button appears multiple times
Styling conflicts
Styling conflicts
Possible causes:
- Theme CSS interfering with button
- Z-index conflicts
- Add custom CSS to your theme
- Adjust button positioning if needed
Popular Plugin Compatibility
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
usingdefine()
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