Page: X-Trees Widgets
From OpenTreeID Help

This page makes the codes to show OpenTreeID on another website: a tree counter, the map of a project, a site or one tree, and the tree selector. You pick a widget, see it as visitors will, and copy the code to paste into your website. Open it with X-Trees Widgets under Plugins in the menu on the left.
Interactions between containers
- The settings on the left change the Preview and the Embed code on the right at once.
- For the tree selector, the line under Project says how many trees are free to choose, with a link to them in Page: Trees. Which trees are free is set in Container: Tree selector.
Page
| Item | Value |
|---|---|
| TabTitle | OpenTreeID |
| URL | https://opentreeid.app/plugins/widgets
|
The chosen widget, project, site and tree are part of the address, so a link to the page opens the same widget.
Widgets
| Widget | Shows |
|---|---|
| Tree counter | How many trees are registered on OpenTreeID, all projects together. It links to opentreeid.org. |
| Project map | A project's sites and trees on a satellite map, with the project's drone photo where it has one. Clicking a tree opens its card. |
| Site map | One site with its outline and its trees. |
| Tree | One tree on the map with its card: name, species, number, site, planting date and description. |
| Tree selector | Lets visitors choose one of a project's free trees, for example to sponsor it. See Use Case: Show your trees on your website. |
Settings
- Project, Site, Tree – what the widget shows. A list with a single choice comes with it picked. For Tree, search by name, number or UUID and pick the tree; Change picks another.
- Trees at a time (tree selector) – how many free trees of a site it shows at once, 5 to 10. Show other trees moves on to the next ones.
- Look – Visitor's setting (light or dark, as the visitor's device), Light or Dark.
- Language – Visitor's language, English, German, Romanian or Greek. Visitor's language uses German, Romanian or Greek for visitors whose browser is set to one of them, and English for everyone else.
- Subscribe button (maps and tree; on the tree selector: “Choose this tree” button) – what the button on a tree's card does:
- Opens the tree in OpenTreeID – the tree's page in the app, in a new tab;
- Opens a page of your website – your own page, for example a sign-up or donation form. Link must start with https://. {code}, {name} and {id} in the link become the tree's number, name and OpenTreeID id, for example https://example.org/subscribe/?tree={code}, so your form knows which tree was chosen;
- Hidden – no button.
- Height (pixels) – the widget's height on your page, 120 to 1200.
Main panel
- Preview – the widget as visitors will see it. Open in a new tab opens the widget on its own.
- Embed code – the code to paste where the widget should appear; the copy button copies it. In WordPress, paste it into a Custom HTML block. It works on any website that allows iframes, and keeps itself up to date.
- Image for documents and presentations (tree counter only) – Google Docs and Slides cannot show web pages, so the counter is also offered as an image. In Docs or Slides choose Insert → Image → By URL and paste the link. The image shows the count of the day it is inserted; insert it again to update it. An image has one look and one language: with Visitor's setting or Visitor's language it takes yours, as the preview does.
Public: A widget is public: everyone who visits the website sees what it shows, without signing in. Embed only projects, sites and trees you want to show to the public.
Side panel
This page has no side panel.