Skip to content

Link in bio page in WordPress

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.

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

page-liens-en-bio.php
<?php
/**
 * Plugin Name: Forge, Page de liens en bio
 * Description: Une page mobile à mettre en lien dans vos réseaux sociaux : portrait, nom, liens prioritaires (réservation, WhatsApp, site, avis, appel), horaires avec statut ouvert ou fermé, réseaux et bouton de partage, en HTML et CSS sans dépendance. Ajoute la composition « Page de liens en bio » à 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-page-liens-en-bio
 *
pattern.html
<!-- wp:html -->
<article class="lbio" aria-labelledby="lbio-name" data-lbio>
        <header class="lbio__head">
        <svg class="lbio__photo" viewBox="0 0 120 120" width="112" height="112" role="img" aria-label="Portrait de Margot Lambert">
          <circle cx="60" cy="60" r="60" fill="#f4d9c6"/>
          <path d="M18 112c6-22 22-32 42-32s36 10 42 32a60 60 0 0 1-84 0Z" fill="#2f5d50"/>
          <path d="M52 70h16v14a8 8 0 0 1-16 0Z" fill="#d9a07f"/>
          <path d="M33 58c-3-22 9-37 27-37s30 15 27 37c-1 9-4 17-8 22l-2-26c-9-2-19-7-24-14-4 7-10 12-16 14l-1 26c-4-5-2-13-3-22Z" fill="#6b3b24"/>
          <ellipse cx="60" cy="56" rx="18" ry="21" fill="#e8b393"/>
          <path d="M42 50c6-1 13-6 18-14 4 8 11 13 18 14-1-10-8-19-18-19s-17 9-18 19Z" fill="#6b3b24"/>
          <circle cx="53" cy="57" r="1.8" fill="#3b2418"/><circle cx="67" cy="57" r="1.8" fill="#3b2418"/>
          <path d="M55 66c3 2.5 7 2.5 10 0" fill="none" stroke="#9a4f35" stroke-width="2" stroke-linecap="round"/>
script.js
(() => {
  if (!document.querySelector(".lbio")) return;
  document.querySelectorAll("[data-lbio]").forEach((page) => {
    const status = page.querySelector("[data-lbio-status]");
    const rows = [...page-page-liens-en-bio.querySelectorAll("[data-lbio-day]")];
    const label = (time) => {
      const [h, m] = time.split(":");
      return `${Number(h)} h${m === "00" ? "" : " " + m}`;
    };
    const minutes = (time) => {
      const [h, m] = time.split(":").map(Number);
      return h * 60 + m;
style.css
:root {
  --lbio-text: #2a211c;
  --lbio-muted: #5c4f47;
  --lbio-page: #fffaf6;
  --lbio-band: #f7dccb;
  --lbio-card: #ffffff;
  --lbio-line: #e3d2c5;
  --lbio-soft-line: #ecdcd0;
  --lbio-accent: #a3401c;
  --lbio-accent-hover: #8a3415;
  --lbio-accent-text: #ffffff;
  --lbio-tint: #f7e4d8;

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 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
  • A 24-door Advent calendar where each surprise only opens from its day in December, with opened doors remembered.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component