Google reviews card in WordPress
A Google reviews summary block: average star rating, review count and breakdown, expandable recent reviews and a link to leave a review, with schema.org structured data.
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, Carte d'avis Google
* Description: Un bloc de synthèse des avis Google : note moyenne en étoiles, nombre et répartition des avis, avis récents dépliables et lien pour laisser un avis, avec données structurées schema.org. Ajoute la composition « Carte d'avis Google » à 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-avis-google
*<!-- wp:html -->
<section class="gavis" aria-labelledby="gavis-title" data-gavis>
<div class="gavis__head">
<p class="gavis__eyebrow">Avis Google</p>
<h2 class="gavis__title" id="gavis-title">Atelier Vélo Lefèvre</h2>
</div>
<div class="gavis__summary">
<div class="gavis__score">
<p class="gavis__value">4,7<span class="gavis__sr"> sur 5</span></p>
<span class="gavis__stars" role="img" aria-label="Note moyenne : 4,7 sur 5"><svg class="gavis__stars-base" viewBox="0 0 120 24" width="110" height="22" aria-hidden="true"><path transform="translate(0 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/><path transform="translate(24 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/><path transform="translate(48 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/><path transform="translate(72 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/><path transform="translate(96 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/></svg><span class="gavis__stars-fill" style="width: 94%"><svg class="gavis__stars-on" viewBox="0 0 120 24" width="110" height="22" aria-hidden="true"><path transform="translate(0 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/><path transform="translate(24 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/><path transform="translate(48 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/><path transform="translate(72 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/><path transform="translate(96 0)" d="M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z"/></svg></span></span>
<p class="gavis__count">127 avis</p>
</div>(() => {
if (!document.querySelector(".gavis")) return;
document.querySelectorAll("[data-gavis]").forEach((card) => {
card.querySelectorAll("[data-gavis-read]").forEach((button) => {
const rest = document.getElementById(button.getAttribute("aria-controls"));
const dots = button.parentElement.querySelector("[data-gavis-dots]");
rest.hidden = true;
dots.hidden = false;
button.hidden = false;
button.addEventListener("click", () => {
const open = button.getAttribute("aria-expanded") !== "true";
button.setAttribute("aria-expanded", String(open));:root {
--gavis-text: #1f2937;
--gavis-muted: #4b5563;
--gavis-card: #ffffff;
--gavis-soft: #f8fafc;
--gavis-line: #e5e7eb;
--gavis-border: #cbd5e1;
--gavis-track: #e5e7eb;
--gavis-star: #b45309;
--gavis-star-off: #d1d5db;
--gavis-accent: #1d4ed8;
--gavis-accent-hover: #1e40af;Free component: copy it freely, including for commercial projects.
Other cards components in WordPress
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

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

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

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

Link in bio page
FreeA 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

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