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.
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.