gamexo developers
Leo Cal

WordPress

The Leo Cal plugin — upload it, paste your key, add the Elementor widget or a shortcode.

The plugin stores your browser key, loads the embed script, and puts Leo Cal on your pages in one of four ways — from the Elementor widget, a shortcode, or a setting. No booking data, customer details or payments pass through WordPress — everything happens in the Leo Cal frame, served from cal.turfleo.com.

VariantWhat the visitor sees
Booking cardThe card on the page: sport, court, date, the free times and the price. Choosing a time opens a pop-up for the details and payment.
Button → centred pop-upA button opening the booking panel as a box in the middle of the page.
Button → sheet from the topA button dropping the full-width booking panel from the top of the window on a desktop.
Floating buttonA button pinned to a bottom corner of the screen, opening the pop-up.

Phones get the booking panel full screen whichever button opens it.

It needs WordPress 5.8 or newer and PHP 7.4 or newer.

Install

Download the plugin

From the embed screen in your dashboard (Settings → Integrations → Your own website or app), or directly from https://cal.turfleo.com/downloads/leo-cal-wordpress.zip.

Upload and activate

In WordPress: Plugins → Add New → Upload Plugin, choose the zip, Install Now, then Activate.

Paste your key

Settings → Leo Cal, and paste the browser key (gxp_…) from your dashboard. The site's address must be listed against that key in the dashboard, with its scheme — https://yourvenue.com, and https://www.yourvenue.com if it answers on both.

Add it to a page

With Elementor, add the Leo Cal booking widget (below). Without it, add one of the shortcodes to any page or post.

Use the browser key, not the secret one

The plugin refuses a key that starts with gx_ — that is a secret key, and pasting it here would publish it in every page's HTML. If you did paste one somewhere, rotate it from the dashboard. A browser key (gxp_…) is the right one.

Elementor

Search the widget panel for Leo Cal booking (it has its own Leo Cal category) and drop it on the page. Its settings, all picked from lists — no attributes to type:

SettingWhat it does
Show asWhich of the four variants: booking card, button → centred pop-up, button → sheet from the top, or floating button.
Branch, Sport, CourtWhere the booking opens, chosen from your venue's own lists. Sport lists only the sports the chosen branch has courts for, and Court only that branch's courts for the chosen sport, or all of them with All. Left on the first option, the customer chooses (and the branch is the one nearest them).
Button text, Button lookFor the three buttons. Looks: Solid (your brand colour), Outline, Dark, Text link, or your theme's button.
AlignmentFor the two in-page buttons.
Card widthFor the card: pixels or a percentage of the column.
CornerFor the floating button: bottom left or bottom right.

The Style tab fine-tunes a button: font, colours (normal and hover), corner radius and padding. Elementor's preview shows the real card, live, while you edit.

The lists come from your key — if they are empty, check the key in Settings → Leo Cal. They are refreshed every ten minutes, or at once when you save the settings.

Shortcodes

[leo_cal] — a button

[leo_cal]
[leo_cal label="Book football" sport="football"]
[leo_cal type="sheet" style="dark"]
[leo_cal type="floating" position="left" label="Book now"]
[leo_cal label="Book at Gandipet" branch="gandipet" class="my-button"]
AttributeWhat it doesDefault
typepopup (centred pop-up), sheet (from the top), floating (bottom corner), or cardpopup
stylesolid (your brand colour), outline, dark, link, or theme (your theme's button)solid
labelThe button text"Book a court", or what you set in Settings → Leo Cal
sportOpens on this sportThe sport set in Settings, or none
branchOpens on this branchThe branch set in Settings, or the one nearest the customer
courtOpens on this courtnone
alignleft, center or right, for the in-page buttonsnone
positionright or left, for type="floating"right
keyUse a different browser key for this buttonThe key set in Settings
classExtra CSS class(es) on the buttonnone

[leo_cal_card] — the booking card on the page

[leo_cal_card]
[leo_cal_card sport="football" width="100%"]
[leo_cal_card branch="gandipet" width="420px"]
AttributeWhat it doesDefault
widthAny CSS length: 380px, 100%, 30rem, 50vw…380px
sport, branch, court, key, classAs aboveas above

The same as [leo_cal type="card"].

The card never grows wider than its column. Use width="100%" to fill it. To place it over a cover image, give it a class and position it with your theme's CSS — the same recipes as in Embedding.

Any other button

You do not need a shortcode to open the pop-up. Add the attribute data-leo-cal to any element — a menu item, an image link, a block's "Additional HTML" — and clicking it opens the booking window. Once your key is set, the plugin loads the script on every page, so nothing else is needed.

AttributeWhat it does
data-sportOpens on this sport: its name, such as tennis or table-tennis
data-branchOpens on this branch, by name
data-courtOpens on this court, by name
data-popup="sheet"The sheet from the top instead of the centred pop-up

On an Elementor button

To use one of Elementor's own buttons (or an add-on's), open the button's Advanced tab → Attributes (an Elementor Pro feature) and put one attribute per line, with a | between the name and the value:

data-leo-cal
data-sport|tennis

Written as HTML on one line instead, such as data-leo-cal sport="tennis", Elementor keeps only the first attribute: the button still opens the booking window, but on the first sport rather than tennis.

Settings → Leo Cal

SettingWhat it is
Browser keyYour gxp_… key. Safe to publish.
Button textThe label on [leo_cal] buttons.
Preselect sportOptional. The sport's name, such as football or table-tennis.
Preselect branchOptional, for venues with more than one location.
Site headerOptional: your theme's header as a CSS selector (.elementor-location-header, #masthead). The sheet slides in under it and leaves it showing.
Floating buttonA floating booking button on every page, with its text, look and corner. For one page only, use the Elementor widget's floating button instead.
Widget address, API addressLeave as they are, unless Turfleo support asks you to change them.

A visitor who is not signed in never sees an error from a missing key: the shortcodes render nothing until a key is set, and an editor sees a short note telling them to add one.

Caching and page builders

The script has a fixed, versioned file name, so your cache plugin can keep it. With Elementor, use the widget. With another page builder that does not run shortcodes, add the HTML from Embedding in its custom-HTML block instead — it works the same.

On this page