Using the ID Attribute
Using the ID Attribute
The id attribute in the [supervised_ai_bot] shortcode is the key to displaying specific chatbots on your site. This attribute maps directly to the row number of the URLs you entered in the plugin's settings page.
How the Mapping Works
When you configure the plugin, you provide a list of Supervised AI chatbot URLs in a textarea, with each URL on its own line. The plugin assigns an ID based on the order of these lines:
- ID 1: The URL on the first line.
- ID 2: The URL on the second line.
- ID 3: The URL on the third line, and so on.
Basic Syntax
To display a specific bot, use the following shortcode format:
[supervised_ai_bot id="X"]
Replace X with the row number of your desired bot URL.
Practical Example
Suppose you have entered the following URLs in your settings:
https://supervised.co/bot/customer-supporthttps://supervised.co/bot/sales-inquiryhttps://supervised.co/bot/technical-docs
To display these specific bots on different pages, you would use:
| Target Bot | Shortcode to Use |
| :--- | :--- |
| Customer Support (Row 1) | [supervised_ai_bot id="1"] |
| Sales Inquiry (Row 2) | [supervised_ai_bot id="2"] |
| Technical Docs (Row 3) | [supervised_ai_bot id="3"] |
Important Considerations
- Sequential Ordering: If you remove a URL from the middle of your list in the settings, the IDs of all bots listed below it will shift up. Ensure you update your shortcodes if you reorganize the URL list.
- Empty Lines: Avoid leaving blank lines between URLs in the settings textarea, as these may count toward the row index depending on your configuration.
- Default Behavior: If the
idattribute is omitted or references a row that does not exist, the chatbot may not load correctly. Always verify that the ID matches the intended row in your settings.