WordPress Installation
Add Grounded chat widget to your WordPress site.
There are several ways to add the Grounded widget to WordPress. Choose the method that works best for your setup.
Method 1: Theme Footer (Recommended)
This is the simplest method for most WordPress sites.
- Go to Appearance > Theme Editor in your WordPress admin
- Select your theme's
footer.phpfile - Find the closing
</body>tag - Paste the widget code just before it:
<script
src="https://grounded.sh/widget/grounded-widget.js"
data-chatbot-id="YOUR_CHATBOT_ID"
async
></script>
</body>
- Click Update File
If you're using a block theme (FSE), see Method 3 below instead.
Method 2: Plugin (Insert Headers and Footers)
If you prefer not to edit theme files:
- Install the Insert Headers and Footers plugin by WPBeginner
- Go to Settings > Insert Headers and Footers
- Paste the widget code in the Scripts in Footer section
- Click Save
This method survives theme updates automatically.
Method 3: Block Themes (Full Site Editing)
For WordPress 5.9+ block themes:
- Go to Appearance > Editor
- Click the Template Parts section
- Edit the Footer template part
- Add a Custom HTML block
- Paste the widget code
- Click Save
Method 4: functions.php
For developers who prefer code:
// Add to your theme's functions.php
function add_grounded_widget() {
?>
<script
src="https://grounded.sh/widget/grounded-widget.js"
data-chatbot-id="YOUR_CHATBOT_ID"
async
></script>
<?php
}
add_action('wp_footer', 'add_grounded_widget');
Troubleshooting
Widget Not Appearing
- Clear your WordPress and browser cache
- Check for JavaScript errors in browser console (F12)
- Verify the chatbot ID is correct
- Ensure no security plugins are blocking external scripts
Conflicts with Other Plugins
If the widget conflicts with other plugins:
- Try loading it with lower priority:
add_action('wp_footer', 'add_grounded_widget', 99); - Check for jQuery conflicts if using older themes
- Contact support with your site URL for help