Embed to WordPress websites
Ready to bring your AI Agent to your WordPress site? With the WPCode plugin, you can embed your Agent in just a few clicks, no coding or theme editing required.
What You’ll Need Before You Start
Before we jump in, make sure you have everything ready:
- A published AI Agent built in MagicBlocks
- Your MagicBlocks Embed Code (here’s the step-by-step on how to get the code (Embedding).
- Admin access to your WordPress site
Step-by-Step: How to Embed Your AI Agent on WordPress
1. Copy the Embed Code from MagicBlocks
Start in your MagicBlocks dashboard:
- Go to Agents
- Select the Agent you want to go live with
- Navigate to the Go Live
- Copy the code to Embed.

This is the script you’ll paste into WordPress to activate the Agent on your site.
This video will explain the step-by-step process on how to embed your AI Agent on Wordpress:
2. Log in to WordPress
From your WordPress admin dashboard:
- Click on “Plugins” in the sidebar
- Then click “Add New Plugin”

3. Search for “WPCode” Plugin
In the search bar, type “WPCode”.
Look for the plugin named:
“WPCode – Insert Headers and Footers + Custom Code Snippets”
4. Install & Activate
Once you’ve located WPCode, click Install Now to begin installation. After installation, the button will change to “Activate” click it to enable the plugin.

6. Go to WPCode > Code Snippets > Header & Footer
In your WordPress dashboard sidebar:
- Click “Code Snippets” (under the new WPCode menu)
- Then select “Header & Footer”
- This opens a simple editor to paste custom code into your site’s footer.

7. Paste the MagicBlocks Embed Code in the Footer Section
In the Footer section of the code editor:
Paste the embed code you copied from MagicBlocks
8. Click “Save Changes”
Scroll down and hit Save Changes to apply the code site-wide.
Your Agent is now active across your WordPress website.
Your AI Agent Is Live! 🎉
Visit your website and you’ll see the MagicBlocks chat icon in the bottom right of your website.
Start Chatting & Testing
Click on the chat icon and test your lead capture flow. Make sure your Agent responds correctly and matches your tone, brand, and objectives.
