Basic Shortcode Usage
Basic Shortcode Usage
The Supervised AI Bots plugin uses a simple shortcode to display your configured chatbots on any WordPress page, post, or compatible widget area.
The [supervised_ai_bot] Shortcode
To display a chatbot, use the following shortcode structure:
[supervised_ai_bot id="1"]
The id Attribute
The id attribute is required to identify which chatbot you want to display. The ID corresponds to the row number of the URL you entered in the plugin's settings page:
- id="1": Displays the chatbot associated with the first URL in your settings list.
- id="2": Displays the chatbot associated with the second URL in your settings list.
- id="n": Displays the chatbot associated with the nth URL in your settings list.
Implementation Examples
Basic Page Integration
You can place the shortcode anywhere within the WordPress Block Editor (using a Shortcode block) or the Classic Editor.
Welcome to our support center. If you have any questions, please use the chat widget below.
[supervised_ai_bot id="1"]
Multiple Bots on Different Pages
If you have configured multiple URLs in the settings (e.g., one for "Sales" and one for "Support"), you can target them specifically by their row index:
- On the "Contact Sales" page:
[supervised_ai_bot id="1"] - On the "Technical Support" page:
[supervised_ai_bot id="2"]
Appearance and Behavior
Once the shortcode is added to a page:
- A floating action button (circle) will appear at the bottom-right of the screen.
- Clicking the button toggles a popup window containing the AI chatbot interface.
- The chatbot scales to a maximum width of 400px and a height of 670px, ensuring a consistent experience across different themes.