> For the complete documentation index, see [llms.txt](https://docs.gpt4business.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpt4business.ai/getting-started/integrations/wordpress.md).

# Wordpress

The GPT4Business.ai chat widget can be embedded into a WordPress website to provide seamless AI-powered customer interaction. There are two main approaches: using the Gutenberg editor (or classic HTML integration) and leveraging WordPress themes or plugins for script embedding.

### Option 1: Embedding the Chat Widget into a Page Using Gutenberg Editor

1. Obtain the Chat Widget Code:

* Log in to the GPT4Business.ai dashboard.
* Copy the embeddable chat widget code (iframe or script tag).

2. Embed the Widget Using Gutenberg:

* Open the WordPress editor (Gutenberg) for the desired page.
* Insert a Custom HTML block from the block options.
* Paste the chat widget code into the Custom HTML block.

3. Save and Verify:

* Click Update to save changes.
* View the live page and confirm that the chat widget is embedded and functional.

### Option 2: Embedding the Chat Widget Using WordPress Theme Customization

1. Access Theme Code (theme.liquid equivalent):

* Navigate to Appearance > Theme Editor in your WordPress admin panel.
* Open the theme file where scripts can be added, such as footer.php or a section that allows code insertion.

2. Insert the Code Before the Closing Body Tag:

* Scroll down to locate the closing \</body> tag.
* Paste the chat widget script code directly before the \</body> tag.
* Save the changes by clicking Update File.

3. Theme Hooks (GeneratePress Example):

* Some themes, like GeneratePress, allow custom hooks:
  * Go to Appearance > Elements.
  * Create a new hook and choose the wp\_footer location.
  * Paste the chat widget script and configure display rules (e.g., all pages or specific pages).
  * Save and activate the hook.

### Option 3: Using a Plugin for Script Integration

If the theme does not support direct code embedding:

1. Install a Plugin:

* Use a plugin like Code Snippets to embed scripts.

2. Add the Script Code:

* Go to the Code Snippets section in your WordPress dashboard.
* Create a new snippet, select HTML or script content, and paste the chat widget script.
* Configure it to load at the footer or end of the body section.

3. Save and Activate:

* Save changes and activate the snippet.
* Clear your website cache if necessary to ensure the changes appear.&#x20;

#### Additional Notes

* Built-in WordPress Chat Features: If your WordPress site includes a default chat widget, disable it to avoid conflicts with the GPT4Business.ai chat widget.
* For complex themes or custom scenarios, reach out to theme support or contact the GPT4Business.ai team for guidance.

### Outcome

By following these methods, businesses can successfully integrate the GPT4Business.ai chat widget into their WordPress website, enabling:

* Real-time AI-powered customer engagement.
* A seamless user experience for customers.
* Efficient chatbot functionality across all or specific pages.

For additional assistance, reach out to the GPT4Business.ai support team.
