Manual Embedding in WordPress
This guide explains how to manually embed a FormAgent.ai agent into your WordPress site.
Prerequisites
- You have a running WordPress site
- You have a FormAgent.ai account and have obtained your Agent ID
Embedding Steps
Embedding via WPCode Plugin (Recommended)
- In your WordPress admin dashboard, go to "Plugins" → "Add New".
- Search for "WPCode" and install the plugin named "WPCode – Insert Headers and Footers + Custom Code Snippets". Click "Install" and then "Activate".
- After activation, find "Code Snippets" in the left sidebar and click "Add New".
- Choose "Custom Snippet" and select "HTML Snippet" as the type.
- Paste the following code into the code editor, replacing
YOUR_AGENT_ID
with your actual Agent ID:
<script defer id="formagent-script" src="https://formagent.ai/embed.js" data-agent-id="YOUR_AGENT_ID"></script>
- You can keep the default "Auto Insert" option for insertion location.
- Save and enable the snippet.
The FormAgent.ai chat widget will now be embedded automatically at the bottom of every page on your site.
Embedding via FormAgent Plugin (Easy Method)
- Download formagent-wp.zip.
- In your WordPress admin dashboard, go to "Plugins" -> "Add New" -> "Upload Plugin".
- Choose the
formagent-wp.zip
file you just downloaded, upload it, and click "Install Now". - After installation is complete, click "Activate Plugin".
- Once activated, go to "Settings" in the left sidebar of your WordPress admin dashboard, and you will see a new "FormAgent.ai" option.
- Click on "FormAgent.ai" to go to the settings page.
- On the settings page, enter your
YOUR_AGENT_ID
and save.
After completing these steps, the FormAgent.ai chat widget will be automatically integrated into the bottom of your website pages.
Troubleshooting
- If the chat widget does not appear, double-check your Agent ID and the script placement.
- Clear your cache and reload the page.
Support
If you have any questions, please contact Support.