Shortcode Reference
Shortcode Reference
The Supervised AI Bots plugin provides a simple shortcode to display your configured chatbots anywhere on your WordPress site. By using the [supervised_ai_bot] shortcode, you can embed a specific bot into pages, posts, or widget areas.
The [supervised_ai_bot] Shortcode
The shortcode uses a single attribute, id, to determine which chatbot to load based on the configuration you provided in the plugin settings.
Attributes
| Attribute | Required | Description |
| :--- | :--- | :--- |
| id | Yes | The numerical identifier of the chatbot URL. |
Understanding the ID Mapping
The id attribute corresponds directly to the order of the URLs entered in the Supervised AI Bots settings page. When you list your chatbot URLs in the plugin's settings textarea (one per line), the plugin assigns them a row number starting from 1.
- Line 1 =
id="1" - Line 2 =
id="2" - Line 3 =
id="3" - ...and so on.
Usage Examples
Basic Integration
To display your first configured chatbot on a page, paste the following shortcode into the WordPress editor:
[supervised_ai_bot id="1"]
Multiple Bots on Different Pages
If you have multiple bots configured for different purposes (e.g., one for Support and one for Sales), use their respective row IDs:
- Support Page:
[supervised_ai_bot id="1"] - Sales Page:
[supervised_ai_bot id="2"]
Display Behavior
When the shortcode is triggered:
- Floating Launcher: A blue circular action button will appear at the bottom-right corner of the screen.
- Interactive Popup: Clicking the button toggles a 400px wide (800px max) popup window containing the Supervised AI interface.
- Seamless Integration: The chatbot loads within an iframe, ensuring it doesn't conflict with your site's existing styles while maintaining a responsive height of 670px.
Quick Tips
- One ID per Shortcode: Ensure you include the
idattribute. If the ID does not match a row in your settings, the bot may not load correctly. - Placement: While you can place the shortcode anywhere in your content, the chatbot launcher will always pin itself to the bottom-right of the browser window for the end-user.
- Updating URLs: If you rearrange the order of URLs in the settings page, remember to update the
idin your shortcodes to match the new row numbers.