Shortcode Syntax
Shortcode Syntax
The Supervised AI Bots plugin uses a simple shortcode to embed and display your configured chatbots on any WordPress page or post.
The [supervised_ai_bot] Shortcode
To display a chatbot, use the following syntax:
[supervised_ai_bot id="1"]
Parameters
The shortcode accepts one primary attribute:
| Attribute | Required | Description |
| :--- | :--- | :--- |
| id | Yes | The numerical ID representing the specific chatbot you wish to display. |
Finding Your Bot ID
The id corresponds to the position of the chatbot URL in your plugin settings:
- Navigate to the Supervised AI Bots settings page in your WordPress Admin dashboard.
- Look at the list of URLs provided in the configuration textarea.
- The IDs are assigned sequentially based on the line number:
- Line 1 =
id="1" - Line 2 =
id="2" - Line 3 =
id="3"(and so on...)
- Line 1 =
Usage Examples
Basic Implementation
To add your primary chatbot (the first URL in your settings) to a post:
[supervised_ai_bot id="1"]
Using Different Bots on Different Pages
If you have multiple chatbots configured for different departments (e.g., Sales and Support), you can place them on specific pages:
- On your "Contact Us" page:
[supervised_ai_bot id="1"] - On your "Technical Documentation" page:
[supervised_ai_bot id="2"]
Behavior and Placement
- Placement: You can place the shortcode anywhere within the WordPress editor. Because the chatbot is styled as a fixed-position popup, it will appear in the bottom-right corner of the browser window regardless of where the shortcode is placed in the page content.
- Visibility: The shortcode will render a floating action button (launcher). When clicked, it opens the chatbot interface in a specialized popup container.
- Single Instance: It is recommended to use only one shortcode per page to prevent interface overlapping.