Attributes for Blocks
by ska-dev 5 (21 reviews)

Attributes for Blocks

Allows to add HTML attributes to Gutenberg blocks.

Attributes for Blocks ranks #3,336 among WordPress.org plugins with 4,000+ active installations, a 5/5 rating from 21 reviews, and was last updated Aug 20, 2026. Data from WordPress.org, refreshed twice daily — see methodology.

Compatible with WP 7.1
v1.0.15 Current Version v1.0.15
Updated 4 weeks ago Last Update on 20 Aug, 2026
Refreshed 7 hours ago Last Refreshed on
Top 5% by installs Downloads -32.1% this week Actively maintained
View on WordPress.org
Rank
#3,336
-1 this week
Active Installs
4K+
-17.3%
KW Avg Position
53.2
0.2 worse
Downloads
40.4K
+61 today
Support Resolved
0%
No change
Rating
100%
Review 5 out of 5
5 (21 reviews)

Next Milestone 5K

Total Progress 84.2%
4K+ 5K+
76
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 158 more installs to reach 5K+

Rank Changes

3,330 3,335 3,340 3,345 3,350 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026 17-09-2026 18-09-2026
3,330 3,337 3,344 3,350 3,357 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 18-09-2026
Current #3,336
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

30 40 50 60 70 80 90 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026 17-09-2026 18-09-2026
30 40 50 60 70 80 90 100 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 18-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
21 reviews
Overall 100%
5
21 (100%)
4
0 (0%)
3
0 (0%)
2
0 (0%)
1
0 (0%)

Security History

Source: WPVulnerability

1 known vulnerability on record · 0 in the last 24 months · checked 4 days ago

  1. Attributes for Blocks [attributes-for-blocks] < 1.0.7

    CVE-2024-8318 · Fixed in v1.0.7

Track This Plugin

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

Start Tracking Free

Plugin Details

Version
1.0.15
Last Updated
Aug 20, 2026
Requires WP
6.2+
Tested Up To
7.1
PHP Version
7.4 or higher
Author
ska-dev

Support & Rating

Rating
★ ★ ★ ★ ★ 5
Reviews
21
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 builders and developers using the Gutenberg block editor. It solves the problem of not being able to add custom HTML attributes—like inline styles, aria attributes, or data attributes—to blocks' front-end output.

  • Adds custom HTML attributes to blocks
  • Advanced inspector controls for Gutenberg
  • Add inline styles to blocks
  • Set aria attributes for accessibility
  • Add data attributes for JS integration
  • Add JavaScript DOM event attributes

Frequently Asked Questions

Common questions about Attributes for Blocks

In your selected block's inspector controls (Block settings) scroll all the way to the bottom and click on "Advanced". It should contain a section called "Additional attributes". Type an attribute name into the "Add attribute" field and press "Add" to add an attribute for the block. A new input with the attribute's name should appear below, into which you can optionally insert the attribute value. Example attributes: style, title, target, class, id, onclick, data-*, aria-*.
For regular blocks, attributes are added to the block save content's root element, meaning they will be rendered only on the front end and not in the editor. For dynamic blocks the attributes are added via render_callback function and they may also be applied in the editor, depending if the block is rendered server or client side.
It should work with normal blocks that render a valid WP Element that can utilize the blocks.getSaveContent.extraProps filter as well as dynamic blocks that utilize a render_callback. Third party blocks that do something unorthodox may not work. Known unsupported blocks Usage with Alpine.js @ prefix in an attribute name is used for "override" mode in this plugin, for Alpine.js attributes use x-on:click instead of @click or use the shorthand syntax with two @ characters instead of one: @@click. Disable block support The afb_unsupported_blocks filter can be used in your child theme's functions.php file to disable block support for adding additional attributes. add_filter('afb_unsupported_blocks', function($blocks) { $blocks[] = 'core/button'; return $blocks; });
Blocks with custom attributes may become invalid, depending on which attributes you've added. From there you can recover the block without the custom attributes by clicking "Attempt Block Recovery" or keep the block with custom attributes as HTML by choosing "Convert to HTML". If you don't want to risk blocks becoming invalid you need to remove all custom attributes before disabling the plugin.
You can modify which roles have the unfiltered_html capability using custom code in your theme's functions.php file or via a custom plugin. Only grant this capability if you trust the current and future users of that role to not do anything malicious. add_action('init', function() { if($role = get_role('contributor')) { $role->add_cap('unfiltered_html'); } });

More plugins by ska-dev

Sign In / Register

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