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.

This is the simplest method for most WordPress sites.

  1. Go to Appearance > Theme Editor in your WordPress admin
  2. Select your theme's footer.php file
  3. Find the closing </body> tag
  4. 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>
  1. 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:

  1. Install the Insert Headers and Footers plugin by WPBeginner
  2. Go to Settings > Insert Headers and Footers
  3. Paste the widget code in the Scripts in Footer section
  4. Click Save

This method survives theme updates automatically.

Method 3: Block Themes (Full Site Editing)

For WordPress 5.9+ block themes:

  1. Go to Appearance > Editor
  2. Click the Template Parts section
  3. Edit the Footer template part
  4. Add a Custom HTML block
  5. Paste the widget code
  6. 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

  1. Clear your WordPress and browser cache
  2. Check for JavaScript errors in browser console (F12)
  3. Verify the chatbot ID is correct
  4. Ensure no security plugins are blocking external scripts

Conflicts with Other Plugins

If the widget conflicts with other plugins:

  1. Try loading it with lower priority: add_action('wp_footer', 'add_grounded_widget', 99);
  2. Check for jQuery conflicts if using older themes
  3. Contact support with your site URL for help