Block Data Attribute
by Mahdi Yazdani 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,456 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 (Current: 7.1.4)
v2.1.0 Current Version v2.1.0
Updated 4 months ago Last Update on 10 Jun, 2026
Refreshed 1 week ago Last Refreshed on
Top 25% by installs
View on WordPress.org
Rank
#10,456
— No change
Active Installs
300+
-17.4%
KW Avg Position
46.3
0.5 better
Downloads
6K
+1 today
Support Resolved
0%
— No change
Rating
100%
Review 5 out of 5
5 (4 reviews)

Next Milestone 400

Total Progress 57%
300+ 400+
635
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 43 more installs to reach 400+

Rank Changes

9,933 10,195 10,456 10,717 10,979 01-11-2026 02-11-2026 03-11-2026 04-11-2026 05-11-2026 06-11-2026 07-11-2026 08-11-2026
10,397 10,414 10,431 10,447 10,464 24-10-2026 25-10-2026 26-10-2026 27-10-2026 28-10-2026 29-10-2026 30-10-2026 31-10-2026 01-11-2026 02-11-2026 03-11-2026 04-11-2026 05-11-2026 06-11-2026 07-11-2026 08-11-2026
Current #10,456
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 01-11-2026 02-11-2026 03-11-2026 04-11-2026 05-11-2026 06-11-2026 07-11-2026 08-11-2026
0 10 20 24-10-2026 25-10-2026 26-10-2026 27-10-2026 28-10-2026 29-10-2026 30-10-2026 31-10-2026 01-11-2026 02-11-2026 03-11-2026 04-11-2026 05-11-2026 06-11-2026 07-11-2026 08-11-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 3 months 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
PHP Version
7.4 or higher
Author
Mahdi Yazdani

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.