Skip to content

Building site photo timeline in WordPress

Building site photos sorted by dated step on a vertical timeline, with the current step highlighted.

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

galerie-chronologie-chantier.php
<?php
/**
 * Plugin Name: Forge, Chronologie de chantier en photos
 * Description: Les photos d’un chantier classées par étape datée sur une frise verticale, avec l’étape en cours mise en avant. Ajoute la composition « Chronologie de chantier en photos » à 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-galerie-chronologie-chantier
 *
pattern.html
<!-- wp:html -->
<section class="gcc" data-gcc aria-labelledby="gcc-titre">
        <p class="gcc-eyebrow">Rénovation d’une cuisine · Angers</p>
        <h2 class="gcc-title" id="gcc-titre">Le chantier, étape par étape</h2>
        <p class="gcc-progress">3 étapes terminées sur 6 · mise à jour le 30 avril 2026</p>
        <ol class="gcc-list" role="list">
          <li class="gcc-step" data-gcc-status="done">
            <span class="gcc-dot gcc-dot--done" aria-hidden="true"></span>
            <div class="gcc-content">
              <p class="gcc-meta"><time datetime="2026-03-02">2 mars 2026</time> · <span class="gcc-badge gcc-badge--done">Terminé</span></p>
              <h3 class="gcc-name">Démolition et dépose</h3>
              <p class="gcc-text">Dépose de l’ancienne cuisine et du carrelage, évacuation des gravats en déchetterie agréée.</p>
style.css
:root {
  --gcc-card: #ffffff;
  --gcc-text: #1f2937;
  --gcc-muted: #4b5563;
  --gcc-accent: #b45309;
  --gcc-done: #15803d;
  --gcc-line: #d1d5db;
  --gcc-soft: #f3f4f6;
  --demo-galerie-chronologie-chantier-bg: #eef0f2;
  --demo-galerie-chronologie-chantier-text: #1f2937;
}

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

Galleries and carousels components in WordPress
  • A product photo that zooms in under the pointer, and from the keyboard with Enter and the arrow keys, to inspect the details.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • YouTube videos shown as thumbnails: the player only loads on click, to respect privacy and keep the page light.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A slideshow that fills the whole screen, browsed with the keyboard or a finger swipe, and closed with Escape.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Projects sorted by type of work, arranged in tabs that work with the keyboard and screen readers.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component