Use Case: Show your trees on your website

From OpenTreeID Help
Revision as of 11:52, 13 November 2026 by Helena (talk | contribs) (Marked this version for translation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The tree selector on a website: visitors pick a free tree
The tree selector on a website: visitors pick a free tree

This guide puts a project's trees on your organisation's website: a map of the project, and a tree selector where visitors choose a tree, for example to sponsor or adopt it.

It uses Widgets (X-Trees Widgets). The widgets read the data from OpenTreeID, so new trees and changes show on the website without touching it again.

Current Scope

  • The tree counter, project map, site map, tree and tree selector widgets.
  • Choosing which trees the tree selector offers.
  • Sending visitors to your own page for a chosen tree.
  • Payments and sign-up forms are on your own website, outside OpenTreeID.

Requirements

  • A website where you can add HTML or an iframe (in WordPress, a Custom HTML block).
  • For the tree selector: a role that lets you edit the project's trees, and trees with a position.

User Story

As the coordinator of a planting project, I want visitors of our website to see our trees and choose one to sponsor, so that support goes to a real tree they can find on the map.

Problem

Screenshots and lists of trees on a website go out of date, and people who want to support a tree cannot see which ones are still free.

Solution

The widget shows the live data from OpenTreeID. The tree selector offers only the trees marked free to choose, a few at a time, and sends the visitor to your own form with the tree's number filled in.

Workflow

# Step Where
1 Choose the free trees Page: Trees → select → Mark free to choose
2 Set up the widget Page: X-Trees Widgets → Tree selector
3 Link your own form “Choose this tree” button → Opens a page of your website
4 Put it on your website Embed code → copy → paste
5 Keep it current Mark chosen trees not free

1. Choose the free trees

Open Page: Trees and filter it to the project. Tick the trees to offer and press Mark free to choose. For a single tree, use the Tree selector card on its page. See Container: Tree selector.

Selected trees, ready to be marked free to choose
Selected trees, ready to be marked free to choose

2. Set up the widget

Open Page: X-Trees Widgets and pick Tree selector and the Project. The line under it says how many trees are free. Choose how many Trees at a time visitors see, the Look and the Language, and check the Preview.

3. Link your own form

Under “Choose this tree” button pick Opens a page of your website and enter the address of your form, with {code} where the tree's number should go, for example https://example.org/sponsor/?tree={code}. In the preview, open a tree and try the button.

4. Put it on your website

Press the copy button next to Embed code and paste the code into your website, in WordPress into a Custom HTML block. Adjust Height (pixels) if the widget needs more room.

5. Keep it current

When a tree has been chosen, mark it not free so the selector stops offering it.

Role-based Access

Action Who
Mark trees free or not free People who can edit the trees
Make widget codes Everyone signed in, for the projects, sites and trees they can see
See a widget Every visitor of the website, without signing in

Configuration

Setting Default
Look Visitor's setting
Language Visitor's language
Button Opens the tree in OpenTreeID
Trees at a time 8
Height 180 px (counter), 480 px (maps and tree), 600 px (tree selector)

Benefits

FOR YOUR VISITORS
Real trees on a real map, the project's drone photo underneath, and a simple way to choose one.
FOR YOUR TEAM
No website work after the first paste: the widget follows the data in OpenTreeID.

Frequently Asked Questions

The tree selector says no trees are free.
Mark trees free to choose in Page: Trees or on a tree's page. Only trees with a position are shown on the map.
Can I show the counter in a presentation?
Yes. Pick Tree counter and use the link under Image for documents and presentations with Insert → Image → By URL.
Who can see a widget?
Everyone who visits the website. A widget needs no sign-in.

Related Pages