Skip to content

Centered gradient hero in WordPress

A centered headline over a soft gradient background, with two actions and a reassurance line.

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-centre-degrade.php
<?php
/**
 * Plugin Name: Forge, Section d'accueil centrée à dégradé
 * Description: Un titre centré sur un fond dégradé doux, avec deux actions et une ligne de réassurance. Ajoute la composition « Section d'accueil centrée à dégradé » à 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-centre-degrade
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "glow-hero", "layout": {"type": "default"}} -->
<section class="wp-block-group glow-hero"><!-- wp:paragraph {"className": "glow-hero__eyebrow"} -->
<p class="glow-hero__eyebrow"><span>Nouveau</span> Rapprochement bancaire automatique</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 1} -->
<h1 class="wp-block-heading">La comptabilité de votre entreprise, tenue au jour le jour</h1>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "glow-hero__lead"} -->
<p class="glow-hero__lead">Importez vos relevés, photographiez vos tickets : Grandlivre classe tout et prépare la déclaration de TVA.</p>
<!-- /wp:paragraph -->
<!-- wp:group {"className": "glow-hero__actions", "layout": {"type": "default"}} -->
<div class="wp-block-group glow-hero__actions"><!-- wp:html -->
style.css
:root {
  --glow-bg: #f8faff;
  --glow-a: #c7d7ff;
  --glow-b: #e9d5ff;
  --glow-text: #0b1736;
  --glow-muted: #3b4a6b;
  --glow-accent: #2347d6;
  --glow-accent-text: #ffffff;
  --glow-chip: #ffffff;
  --glow-ring: #2347d6;
  --demo-hero-centre-degrade-bg: #f8faff;
  --demo-hero-centre-degrade-text: #0b1736;

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