Skip to content

Hero with key figures in WordPress

A powerful headline followed by a row of three reassuring figures.

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

Open in a new tab

The code in WordPress

hero-chiffres-cles.php
<?php
/**
 * Plugin Name: Forge, Section d'accueil avec chiffres clés
 * Description: Un titre puissant suivi d'une rangée de trois chiffres qui rassurent. Ajoute la composition « Section d'accueil avec chiffres clés » à 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-hero-chiffres-cles
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "figures-hero", "layout": {"type": "default"}} -->
<section class="wp-block-group figures-hero"><!-- wp:heading {"level": 1} -->
<h1 class="wp-block-heading">Retrouvez votre forme, à votre rythme</h1>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "figures-hero__lead"} -->
<p class="figures-hero__lead">Coaching individuel et en petits groupes à Lille, en salle ou en extérieur. Premier bilan offert.</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
<a class="figures-hero__cta" href="#bilan">Réserver mon bilan</a>
<!-- /wp:html -->
<!-- wp:html -->
<dl class="figures-hero__stats">
style.css
:root {
  --fig-bg: #111111;
  --fig-text: #f5f5f5;
  --fig-muted: #c8c8c8;
  --fig-accent: #ff4d2e;
  --fig-accent-text: #1a0602;
  --fig-line: #333333;
  --fig-ring: #ff4d2e;
  --demo-hero-chiffres-cles-bg: #111111;
  --demo-hero-chiffres-cles-text: #f5f5f5;
}

Free component: copy it freely, including for commercial projects.

Hero sections components in WordPress
  • A dark hero where very large words, outlined or at low opacity, pass behind a two-column text. The animation is CSS only, with no script and no image.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A festival or fair header: dates, venue, featured artists, a real countdown to opening and ticket options.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Headline, service area, Google rating and job-site photo, with a direct call button and a short callback form (name, phone, need).

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A bright, warm hero: highlighted promise, two buttons, an avatar stack with a rating out of 5, and on the right a customer quote surrounded by result chips.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Headline, promise and two actions on the left, vector illustration on the right.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A large serif composition, sober and composed, for liberal professions.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component