Skip to content

Job offer card in WordPress

A clear job offer: the essentials at a glance, foldable missions and profile, and a pre-filled e-mail application.

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-offre-emploi.php
<?php
/**
 * Plugin Name: Forge, Carte d’offre d’emploi
 * Description: Une offre d’emploi claire : l’essentiel en un coup d’œil, missions et profil dépliables, candidature par e-mail pré-rempli. Ajoute la composition « Carte d’offre d’emploi » à 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-offre-emploi
 *
pattern.html
<!-- wp:html -->
<article class="coe" data-coe aria-labelledby="coe-titre">
        <p class="coe-company">Brûlerie de Gerland · torréfaction artisanale</p>
        <h2 class="coe-title" id="coe-titre">Préparateur ou préparatrice de commandes</h2>
        <dl class="coe-facts">
          <div class="coe-fact"><dt class="coe-fact-k">Contrat</dt><dd class="coe-fact-v">CDI, 35 h</dd></div>
          <div class="coe-fact"><dt class="coe-fact-k">Lieu</dt><dd class="coe-fact-v">Lyon 7e</dd></div>
          <div class="coe-fact"><dt class="coe-fact-k">Salaire</dt><dd class="coe-fact-v">2 300 à 2 600 € brut / mois</dd></div>
          <div class="coe-fact"><dt class="coe-fact-k">Début</dt><dd class="coe-fact-v">Janvier 2027</dd></div>
        </dl>
        <p class="coe-pitch">Nous torréfions 40 cafés d’origine pour 300 restaurants et des milliers de particuliers. Rejoignez une équipe de neuf personnes dans un atelier où ça sent bon.</p>
        <button class="coe-toggle" type="button" aria-expanded="false" aria-controls="coe-detail" data-coe-toggle hidden>Voir le détail du poste</button>
script.js
(() => {
  if (!document.querySelector(".coe")) return;
  document.querySelectorAll("[data-coe]").forEach((root) => {
    const on = (el, type, fn) => el.addEventListener(type, fn);
    const toggle = root.querySelector("[data-coe-toggle]");
    const detail = root.querySelector("[data-coe-detail]");
    // Without the script the detail stays visible: it is only folded once the button can unfold it.
    toggle.hidden = false;
    detail.hidden = true;
    on(toggle, "click", () => {
      const open = toggle.getAttribute("aria-expanded") !== "true";
      toggle.setAttribute("aria-expanded", String(open));
style.css
:root {
  --coe-card: #ffffff;
  --coe-text: #241b14;
  --coe-muted: #5b4c40;
  --coe-line: #eadfd4;
  --coe-chip: #f8f1ea;
  --coe-accent: #7c3a10;
  --coe-accent-text: #ffffff;
  --demo-carte-offre-emploi-bg: #f3ece5;
  --demo-carte-offre-emploi-text: #241b14;
}

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