Skip to content

Profile card in WordPress

Initials avatar, name, role, short bio and booking link.

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

carte-profil.php
<?php
/**
 * Plugin Name: Forge, Carte de profil
 * Description: Avatar à initiales, nom, fonction, courte présentation et lien de prise de rendez-vous. Ajoute la composition « Carte de profil » à 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-carte-profil
 *
pattern.html
<!-- wp:html -->
<ul class="demo-carte-profil__grid">
      <li class="profile">
        <span class="profile__avatar" style="--avatar: #7c3aed" aria-hidden="true">AR</span>
        <h2>Amélie Roche</h2>
        <p class="profile__role">Ostéopathe D.O.</p>
        <p class="profile__bio">Spécialisée en périnatalité et suivi des nourrissons.</p>
        <a href="#rendez-vous">Prendre rendez-vous<span class="profile__hidden"> avec Amélie Roche</span></a>
      </li>
      <li class="profile">
        <span class="profile__avatar" style="--avatar: #0d9488" aria-hidden="true">TB</span>
        <h2>Thomas Blanc</h2>
style.css
:root {
  --profile-bg: #ffffff;
  --profile-line: #e7e5f0;
  --profile-text: #1e1b2e;
  --profile-muted: #5b5670;
  --profile-link: #1e1b2e;
  --profile-ring: #6d28d9;
  --demo-carte-profil-bg: #f7f6fb;
  --demo-carte-profil-text: #1e1b2e;
}

@media (prefers-color-scheme: dark) {

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

Cards components in WordPress
  • A single-plan pricing card: struck-through price and discount, a places-left gauge driven by a data attribute, the list of everything included and a booking button that turns into a waiting list once sold out.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Three treatment cards in accessible neumorphism: gently raised surfaces, buttons that sink in when activated, a light/dark switch for the block itself. 3:1 outlines and AA text kept.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four fully clickable workshop cards in a neo-brutalist style: thick border, solid offset shadow and a card that sinks onto its shadow on hover or focus. Pastel tones, dark mode, no JavaScript.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Three brutalist service cards: one-pixel border, hard offset shadow that lifts on hover and sinks on click, large type, accent and dark variants. No JavaScript.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A mobile page to link from your social profiles: portrait, name, priority links (booking, WhatsApp, website, reviews, call), opening hours with an open or closed status, social links and a share button, in dependency-free HTML and CSS.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A seasonal promotion card with a struck-through price and discount that announces by itself whether the offer is coming, how many days are left or that it is over.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component