Integrations
6.1. Integration with WordPress
2 viewsNeed help? ↗
Obtaining a widget code in TozheBot
Before you can insert the code into your website, you need to create the widget in the platform's admin panel.
- Go to the Widgets section (https://tozhebot.ru/admin/collections/chat-widgets)
- Click "Create widget".
- Fill in the required fields in the "General" section:
- Widget name (e.g., "Website Support").
- Widget identifier (slug): a unique code in English, such as `site-support`. It is used in the installation code.
- Agent: select an agent who is both public and active. The system will not allow you to choose a private or inactive agent — this serves as a safeguard against accidental publication.
- In the "Appearance" section, configure the color, position (bottom left/right), greeting, and window title.
- In the "Security" section, specify the "Allowed domains." If you leave this field blank, the widget will work on any domain. For production environments, it is strongly recommended to specify particular domains.
- Save the widget.
Once the widget has been saved, scroll to the "Widget code" section and copy it:
WordPress
There are two ways. The first is via the theme editor (if you have access), and the second is via a plugin (which is safer for beginners).
Method 1: Theme Editor (direct insertion)
- In the WordPress admin panel, go to "Appearance" → "Theme File Editor".
- In the right-hand column, select the `footer.php` file (or the equivalent footer file for your theme).
- Locate the closing `</body>` tag and insert the copied widget code immediately before it.
- Click "Update File".
Method 2: WPCode plugin (recommended)
If you don’t want to touch the theme code, install the WPCode plugin (formerly Insert Headers and Footers).
- Install and activate the plugin.
- In the left-hand menu, select "WPCode" → "Code Snippets" → "Add Snippet."
- Choose either "HTML Snippet" or "JavaScript Snippet."
- Paste the widget code into the field.
- In the insertion settings, select "Footer" and save.
This way, you can easily embed the TozheBot widget into your WordPress site.
Need help with integration? Contact us:https://tozhebot.ru/en/contacts