Shortcode System
Shortcode Overview
The Supervised AI Bots plugin uses a simple shortcode system to embed specific chatbots into your WordPress posts, pages, or widget areas. By using the [supervised_ai_bot] shortcode, you can trigger a floating interactive chat interface for your visitors.
Basic Syntax
[supervised_ai_bot id="X"]
The ID Mapping System
The id attribute is the core of the shortcode system. It functions as a direct reference to the list of URLs provided in the plugin's settings page.
To determine which ID to use:
- Navigate to the Supervised AI Bots settings in your WordPress admin dashboard.
- Locate the textarea where you entered your chatbot URLs.
- The ID corresponds to the line number of the URL in that list.
| Line Number | Shortcode Attribute | Target Bot |
| :--- | :--- | :--- |
| Line 1 | id="1" | The first URL in your list |
| Line 2 | id="2" | The second URL in your list |
| Line 3 | id="3" | The third URL in your list |
Attributes
| Attribute | Required | Type | Description |
| :--- | :--- | :--- | :--- |
| id | Yes | Integer | The row index of the bot URL defined in settings (starting from 1). |
Usage Examples
Single Bot Integration
To display the chatbot associated with your first URL on a "Contact Us" page:
[supervised_ai_bot id="1"]
Multiple Bots on Different Pages
You can use different IDs on different pages to provide context-specific AI assistance. For example, use a Sales bot on your pricing page and a Support bot on your documentation page:
Pricing Page:
[supervised_ai_bot id="2"]
Support Page:
[supervised_ai_bot id="3"]
User Interface & Behavior
When the shortcode is rendered on the front end, it generates two primary components:
- Floating Launcher: A blue circular button appears at the bottom-right corner of the screen.
- Chat Popup: When the launcher is clicked, a 400px wide (max 800px) and 670px high popup opens, containing the Supervised AI interface via an iframe.
- Toggle Functionality: Clicking the button again or using the close interface will hide the chatbot from view.
Display Notes
- Mobile Responsiveness: The popup is designed to remain fixed at the bottom-right to ensure accessibility across devices.
- Placement: The shortcode can be placed anywhere in the content editor; however, the actual chat interface will always float in the fixed bottom-right position defined by the plugin's global styles.