Block Data Attribute
by Mahdi 5 (4 reviews)

Block Data Attribute

Add custom HTML data attributes to core WordPress blocks directly from the block editor sidebar — no coding required.

Block Data Attribute ranks #10,484 among WordPress.org plugins with 300+ active installations, a 5/5 rating from 4 reviews, and was last updated Jun 10, 2026. Data from WordPress.org, refreshed twice daily — see methodology.

Tested up to WP 7.0.4 (Current: 7.1)
v2.1.0 Current Version v2.1.0
Updated 3 months ago Last Update on 10 Jun, 2026
Refreshed 6 hours ago Last Refreshed on
Top 25% by installs
View on WordPress.org
Rank
#10,484
No change
Active Installs
300+
-17.4%
KW Avg Position
48.3
0.5 better
Downloads
7K
+4 today
Support Resolved
0%
No change
Rating
100%
Review 5 out of 5
5 (4 reviews)

Next Milestone 400

Total Progress 65%
300+ 400+
445
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro

Unlock Exact Install Count

See the precise estimated active installs for this plugin, calculated from real-time ranking data.

  • Exact install estimates within tiers
  • Track install growth over time
  • Milestone progress predictions
Upgrade to Pro
Need 35 more installs to reach 400+

Rank Changes

10,480 10,491 10,503 10,515 10,526 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026 17-09-2026
10,480 10,491 10,503 10,515 10,526 02-09-2026 03-09-2026 04-09-2026 05-09-2026 06-09-2026 07-09-2026 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026 17-09-2026
Current #10,484
Change
Best #

Upgrade to Pro

Unlock 30-day and 90-day rank history charts with a Pro subscription.

Upgrade Now

Active Installs Growth

Active Installs 0,000,000+
Growth +0.0%
Peak 0,000,000

Downloads Growth

0 10 20 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026 17-09-2026
0 10 20 02-09-2026 03-09-2026 04-09-2026 05-09-2026 06-09-2026 07-09-2026 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026 17-09-2026
Downloads
Growth
Peak

Upgrade to Pro

Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.

Upgrade Now

Reviews & Ratings

5.0
4 reviews
Overall 100%
5
4 (100%)
4
0 (0%)
3
0 (0%)
2
0 (0%)
1
0 (0%)

Security History

Source: WPVulnerability

No known vulnerabilities on record for Block Data Attribute. Checked 1 month ago.

Track This Plugin

Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.

Start Tracking Free

Plugin Details

Version
2.1.0
Last Updated
Jun 10, 2026
Requires WP
6.0+
Tested Up To
7.0.4
PHP Version
7.4 or higher
Author
Mahdi

Support & Rating

Rating
★ ★ ★ ★ ★ 5
Reviews
4
Support Threads
0
Resolved
0%

Keywords

Upgrade to Pro

Unlock keyword rankings, search positions, and detailed analytics with a Pro subscription.

Upgrade Now

TL;DR

AI summary of the plugin's readme

This plugin is for WordPress site owners and developers who need to add custom data-* attributes to core blocks. It solves the problem of attaching HTML data attributes to block markup without theme edits, custom code, or block validation errors.

  • Add data-* attributes to blocks
  • Name and value fields with sanitisation
  • Drag-and-drop attribute reordering
  • Saved directly in block markup
  • Extensible via JavaScript filter
  • No build step required
  • Translation-ready

Frequently Asked Questions

Common questions about Block Data Attribute

Open a page or post in the block editor. Select a supported block (e.g. a Paragraph or Button block). Open the block settings sidebar by clicking the ⚙ Settings icon in the top-right toolbar. Scroll down to the Block Data Attribute panel and expand it. Fill in the Name and Value fields. The name will automatically be prefixed with data- in the saved HTML. Click + Add attribute to add more pairs as needed. Save or publish your post.
A paragraph block with a data-highlight="true" attribute would produce: <p data-highlight="true">Your content here.</p>
By default: core/button, core/column, core/columns, core/group, core/heading, and core/paragraph.
Yes. Use the mypreview.blockDataAttributeAllowedBlocks JavaScript filter: wp.hooks.addFilter( 'mypreview.blockDataAttributeAllowedBlocks', 'my-plugin/extend-allowed-blocks', ( allowedBlocks ) => [ ...allowedBlocks, 'core/image', 'core/list' ] );
No. Attributes are stored as part of the block's serialised markup. The plugin uses the blocks.getSaveContent.extraProps filter, which is the officially supported WordPress API for this purpose.
Yes. The plugin works in any context where the block editor is used, including the Site Editor.

Sign In / Register

You need to sign in or register to use this feature.