Limited offer with remaining seats in WordPress
A promotional card for a course, a workshop or an opening: remaining seats, a fill bar, the registration deadline and a booking button, with no countdown timer.
Here is an excerpt of this component's code in WordPress. The full code is free for members, ready to copy into your project.
This component also comes in
The code in WordPress
<?php
/**
* Plugin Name: Forge, Offre limitée avec places restantes
* Description: Un encart de promotion pour un stage, un atelier ou une ouverture : nombre de places restantes, barre de remplissage, date de fin des inscriptions et bouton de réservation, sans compte à rebours. Ajoute la composition « Offre limitée avec places restantes » à l'éditeur de blocs.
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 8.1
* Author: Forge
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: forge-cta-offre-limitee-compteur-places
*<!-- wp:html -->
<section class="olp" data-olp data-olp-total="12" data-olp-left="3" data-olp-end="2027-03-13T18:00:00+01:00" data-olp-state="low" aria-labelledby="olp-titre">
<div class="olp-head">
<p class="olp-badge" data-olp-badge data-olp-tone="low">Dernières places</p>
<h2 class="olp-title" id="olp-titre">Stage de tournage pour débutants, session de printemps</h2>
<p class="olp-lead">Quatre samedis matin à l’atelier pour apprendre à centrer la terre, monter un bol et l’émailler. Le groupe est limité à 12 personnes pour que chacun passe au tour aussi souvent que nécessaire.</p>
</div>
<dl class="olp-facts">
<div class="olp-fact">
<dt class="olp-dt">Dates</dt>
<dd class="olp-dd">4 samedis, du 20 mars au 10 avril</dd>
</div>(() => {
if (!document.querySelector(".olp")) return;
document.querySelectorAll("[data-olp]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
const offs = [];
const total = () => Math.max(1, Math.floor(Number(root.getAttribute("data-olp-total"))) || 1);
const out = (name) => root.querySelector(`[data-olp-${name}]`);
const day = new Intl.DateTimeFormat("fr-FR", {
weekday: "long",
day: "numeric",
month: "long",
year: "numeric",:root {
--olp-card: #fffaf5;
--olp-text: #2a1d14;
--olp-muted: #66503f;
--olp-line: #ecdccb;
--olp-soft: #f8eee4;
--olp-track: #f0dfcf;
--olp-fill: #c2410c;
--olp-accent: #9a3412;
--olp-on-accent: #ffffff;
--olp-low-bg: #fde8d7;
--olp-open-bg: #e3efe0;Free component: copy it freely, including for commercial projects.
Other calls to action components in WordPress
Calls to action components in WordPress
A Free quote within 24 hours banner with a request button, a clickable phone number and three guarantees (no commitment, fast reply, free visit), with no JavaScript.
- Tailwind
- React
- CSS
- WordPress

A desktop contact card with a clickable tel: number, a live Available badge and response hours, for tradespeople who want to be phoned directly.
- Tailwind
- React
- CSS
- WordPress

Countdown CTA
FreeA call to action for a limited offer: serif heading, two links and a countdown in days, hours and minutes inside a coupon-style frame.
- Tailwind
- React
- CSS
- WordPress

A direct-call block for emergencies, with the number in very large type and response times.
- Tailwind
- React
- CSS
- WordPress

A sign-up box with an email field, a button and a note on how the address is used.
- Tailwind
- React
- CSS
- WordPress

A full-width band with a heading, a sentence and two action buttons.
- Tailwind
- React
- CSS
- WordPress