Quick contact buttons in WordPress
Three buttons to call, message on WhatsApp or send an email, with ready-made tel:, wa.me and mailto: links. The simple contact block that customers of a tradesperson or small business expect.
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
The code in WordPress
<?php
/**
* Plugin Name: Forge, Boutons de contact rapide
* Description: Trois boutons côte à côte pour appeler, écrire sur WhatsApp ou envoyer un e-mail, avec des liens tel:, wa.me et mailto: déjà préremplis. Le bloc de contact simple qu'attendent les clients d'un artisan ou d'une TPE. Ajoute la composition « Boutons de contact rapide » à 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-bouton-appel-rapide-whatsapp-email
*<!-- wp:html -->
<section class="bcr" aria-labelledby="bcr-titre" data-bcr>
<h2 class="bcr__title" id="bcr-titre">Une fuite, un devis ? Contactez-nous</h2>
<p class="bcr__intro">Plomberie Garnier, à Tours et dans un rayon de 30 km. Choisissez le moyen qui vous arrange, nous répondons dans la journée.</p>
<ul class="bcr__list" role="list">
<li>
<a class="bcr__btn bcr__btn--call" href="tel:+33247051862">
<svg class="bcr__icon" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2"/></svg>
<span class="bcr__text"><span class="bcr__label">Appeler</span> <span class="bcr__detail">02 47 05 18 62</span></span>
</a>
</li>
<li>(() => {
if (!document.querySelector(".bcr")) return;
// The copy button is a fallback for computers without a mail client, so it only appears when the clipboard is usable.
document.querySelectorAll("[data-bcr]").forEach((group) => {
const button = group.querySelector("[data-bcr-copy]");
const status = group.querySelector("[data-bcr-status]");
if (!button || !status || !navigator.clipboard) return;
let timer = 0;
button.hidden = false;
button.addEventListener("click", async () => {
try {
await navigator.clipboard.writeText(button.dataset.bcrCopy);:root {
--bcr-text: #0f172a;
--bcr-body: #475569;
--bcr-surface: #ffffff;
--bcr-line: #e2e8f0;
--bcr-call-bg: #1d4ed8;
--bcr-call-hover: #1e40af;
--bcr-call-text: #ffffff;
--bcr-wa-bg: #15803d;
--bcr-wa-hover: #166534;
--bcr-wa-text: #ffffff;
--bcr-mail-border: #94a3b8;Free component: copy it freely, including for commercial projects.
Other buttons components in WordPress
Buttons components in WordPress
A row of buttons to share the page on Facebook, LinkedIn, WhatsApp or by email, with a copy-link button and no third-party script.
- Tailwind
- React
- CSS
- WordPress

Toggle heart buttons that count favourites, remember them between visits and announce them to screen readers.
- Tailwind
- React
- CSS
- WordPress

A button that adds an event to Google Calendar, Outlook or any calendar through an .ics file, with no third-party service.
- Tailwind
- React
- CSS
- WordPress

A button that copies an IBAN, a reference, an address or a promo code and confirms "Copied", on screen and to screen readers.
- Tailwind
- React
- CSS
- WordPress

A WhatsApp button pinned to the bottom of the screen that opens a welcome bubble with common topics and a pre-filled message, with no third-party widget.
- Tailwind
- React
- CSS
- WordPress

A bar pinned to the bottom of mobile screens with Call and Directions buttons and a live open-now status, built for trades and local shops.
- Tailwind
- React
- CSS
- WordPress