Block Data Attribute
Add custom HTML data attributes to core WordPress blocks directly from the block editor sidebar — no coding required.
Utiliser avec prudence
Block Data Attribute works, but test it on a staging site before relying on it in 2026. It runs on 300+ sites, is rated 5/5 and was last updated 6 months ago, and scores 61/100 on our health check.
- Petite base d'utilisateurs (plus de 300 installations actives)
- Très peu de critiques jusqu'à présent
Comment s'accumule-t-il ?
Côte à côte sur les installations, les mises à jour, les évaluations et le supportTéléchargements quotidiens
Les pics de téléchargement suivent généralement une nouvelle version - chaque site qui met à jour automatiquement compte comme un téléchargement.
Classements
Where Block Data Attribute stands todayWordPress.org Classements de recherche
Position en direct dans la recherche de plugins, Top 100| Mot-clé | Position |
|---|---|
| block settings | #45 |
| éditeur de blocs | >100 |
| custom attribute | #8 |
| data attribute | #1 |
| Gutenberg | >100 |
Adoption de version
Part de sites actifs par version.
Répartition des notes
★★★★★ ★★★★★ 5 sur 4 avis
About Block Data Attribute
À partir du Lisezmoi officiel · v2.1.0Description
Block Data Attribute lets you attach custom data-* attributes to core WordPress blocks straight from the block settings sidebar. No theme edits, no custom code, no block validation errors.
data-* attributes are a standard HTML mechanism for storing extra information on elements. They are widely used for JavaScript interactions, CSS targeting, analytics tagging, accessibility enhancements, and third-party integrations. This plugin brings that capability into the block editor in a clean, structured way.
Principales caractéristiques
- Add any number of
data-*attributes to supported blocks. - Name and value fields with input sanitisation built in.
- Drag-and-drop reordering of attributes within the sidebar panel.
- Attributes are saved directly in block markup — no post meta, no database overhead.
- Fully extensible: register additional allowed block types via a JavaScript filter.
- No build step required — ships as a single plain JavaScript file.
- Traduction-prête.
Supported Blocks
Out of the box the following core blocks support custom data attributes:
core/buttoncore/columncore/columnscore/groupcore/headingcore/paragraph
Installation
Obligations
- WordPress 6.0 or later
- PHP 7.4 ou version ultérieure
- MySQL 5.6 / MariaDB 10.0 or later
Automatic installation (recommended)
- Log in to your WordPress dashboard and go to Plugins → Add New.
- Search for Block Data Attribute.
- Cliquez sur Installer maintenant, puis sur activer.
Installation manuelle
- Download the plugin zip from the WordPress plugin directory.
- Go to Plugins → Add New → Upload Plugin.
- Upload the zip file and click Install Now, then Activate.
Alternatively you can upload the unzipped plugin folder to /wp-content/plugins/ via FTP and activate it from the Plugins screen.
Réactualisation
Automatic updates work via the WordPress dashboard. We still recommend taking a backup before any update.
Journal de modifications
UI and drag-and-drop improvements; no data migration required when upgrading from 2.x.
2.1.0
- Rewritten as a single-file plain JavaScript build — no bundler or Composer required.
- Improved sidebar UI: consistent field widths, full-width Add attribute button, reserved space for the remove button so layout does not shift.
- Fixed drag-and-drop reordering: only the handle icon triggers dragging, leaving text inputs and the remove button fully interactive.
- Updated drag handle to a standard 6-dot grid icon.
- Bumped minimum WordPress requirement to 7.0.
2.0.2
- Compatibility with WordPress 6.1.
2.0.1
- Added missing
data-prefix to the attribute name output.
2.0.0
- Support for defining an unlimited number of attributes per block.
- Compatibility with WordPress 6.0.
- Updated dependencies.
1.0.5
- Fixed incorrect escaping applied to the data attribute value.
1.0.4
- Updated dependencies.
- Compatibility with WordPress 5.5.
Pour les développeurs
Est-ce votre plugin ? Montrez les chiffres.
Ajoutez un badge en direct à votre site, docs ou github readme. Il se met à jour par lui-même - aucun compte n'est nécessaire.
Best Block Data Attribute alternatives
All block settings plugins →| Rang | Plugin | Installations actives |
|---|---|---|
| 2 |
|
<10 |
FAQ
Block Data Attribute: quick answers
Réponses directes, extraites des données en direct WordPress.org.
Source : WordPress.org
Is Block Data Attribute free?
Yes. Block Data Attribute is free to download and use from the official WordPress.org plugin directory.
Is Block Data Attribute safe to use in 2026?
Block Data Attribute works, but test it on a staging site before relying on it in 2026. It runs on 300+ sites, is rated 5/5 and was last updated 6 months ago, and scores 61/100 on our health check.
How many websites use Block Data Attribute?
Block Data Attribute is active on 300+ WordPress websites and has been downloaded 7,460 times since it launched in February 2020. It was downloaded 226 times in the last 30 days.
Does Block Data Attribute work with WordPress 7.1?
Block Data Attribute is officially tested up to WordPress 7.0.9, while the latest release is 7.1.5. It may still work, but try it on a staging site first.
What PHP version does Block Data Attribute need?
Block Data Attribute requires PHP 7.4 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Block Data Attribute last updated?
The latest version, 2.1.0, was released on June 10, 2026 (6 months ago).
Who makes Block Data Attribute?
Block Data Attribute is developed and maintained by Mahdi Yazdani.
What are the best alternatives to Block Data Attribute?
The most popular alternatives to Block Data Attribute are Multigovernance (<10 installs).
Propulsé par PageForge
Un modèle et une feuille de calcul. Une vraie page pour chaque recherche.
PageForge transforme chaque ligne d'un CSV en une page WordPress avec son propre titre, URL, SEO et schéma, construit sur la mise en page que vous Déjà conçu. Gratuit sur WordPress.org.
- CSV et XLSX, plus Google Sheets sur les professionnels et les entreprises
- Son propre titre, URL, SEO champs et schéma pour chaque page
- Fonctionne avec l'éditeur de blocs, Elementor, Divi et Avada
- Gratuit sur WordPress.org, pas de carte de crédit

