Shortcode Usage
Shortcode Usage
The [supervised_ai_bot] shortcode is the primary method for embedding your Supervised AI chatbots into WordPress. You can place this shortcode within the block editor, classic editor, or any widget area that supports shortcodes.
Basic Syntax
To display a chatbot, use the following syntax:
[supervised_ai_bot id="X"]
Attributes
The shortcode accepts a single mandatory attribute:
| Attribute | Required | Description |
| :--- | :--- | :--- |
| id | Yes | The row number of the chatbot URL as defined in the plugin settings page. |
Finding your Bot ID
The id corresponds to the line number of the URL you entered in the Supervised AI Bots settings menu:
- Navigate to Supervised AI Bots in your WordPress admin dashboard.
- Look at the textarea containing your bot URLs.
- The first URL in the list is
id="1", the second URL isid="2", and so on.
Examples
Display the first chatbot in your list:
[supervised_ai_bot id="1"]
Display a specific chatbot on a dedicated landing page:
[supervised_ai_bot id="3"]
Display Behavior
When the shortcode is added to a page:
- Floating Launcher: A circular blue chat icon will appear in the bottom-right corner of the screen.
- Interactive Popup: Clicking the icon toggles a chat window (400px width) that loads your Supervised AI interface via a secure iframe.
- Persistent Visibility: The chat button remains fixed to the viewport as the user scrolls, ensuring the bot is always accessible.
Usage Tips
- One Bot Per Page: It is recommended to use only one chatbot shortcode per page to avoid UI conflicts between multiple floating buttons.
- Theme Compatibility: The chatbot is designed to overlay existing content. If your theme has "Back to Top" buttons or other sticky elements in the bottom-right corner, you may need to adjust their position via CSS to prevent overlapping.