Skip to content

Rotating circular text in WordPress

A badge of text laid out in a circle that slowly turns around an icon, next to a short pitch.

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

effet-texte-circulaire-rotatif.php
<?php
/**
 * Plugin Name: Forge, Texte circulaire qui tourne
 * Description: Un macaron de texte disposé en cercle qui tourne lentement autour d’une icône, à côté d’une présentation. Ajoute la composition « Texte circulaire qui tourne » à 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-effet-texte-circulaire-rotatif
 *
pattern.html
<!-- wp:group {"tagName": "section", "className": "efcr", "layout": {"type": "default"}} -->
<section class="wp-block-group efcr"><!-- wp:group {"className": "efcr__copy", "layout": {"type": "default"}} -->
<div class="wp-block-group efcr__copy"><!-- wp:paragraph {"className": "efcr__eyebrow"} -->
<p class="efcr__eyebrow">Pâtisserie Mira · Lyon 4e</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level": 2, "className": "efcr__title", "anchor": "efcr-titre"} -->
<h2 class="wp-block-heading efcr__title" id="efcr-titre">Des gâteaux faits maison, chaque matin</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"className": "efcr__text"} -->
<p class="efcr__text">Entremets, tartes de saison et viennoiseries au beurre AOP, préparés dans notre laboratoire de la Croix-Rousse depuis 1998.</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
style.css
:root {
  --efcr-bg: #fffbeb;
  --efcr-text: #451a03;
  --efcr-body: #78350f;
  --efcr-ring: #92400e;
  --efcr-accent: #b45309;
  --efcr-on-accent: #ffffff;
  --efcr-core: #fde68a;
  --demo-effet-texte-circulaire-rotatif-bg: #fffdf5;
  --demo-effet-texte-circulaire-rotatif-text: #451a03;
}

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

Visual effects components in WordPress
  • Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A paragraph whose words turn from grey to full ink, one by one, as the page scrolls, in pure CSS with a plain-text fallback.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four offset, translucent sine waves gently roll along the bottom of a section, each at its own pace.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component