by ska-dev
5 (21 reviews)
Attributes for Blocks
Allows to add HTML attributes to Gutenberg blocks.
Compatible with WP 6.9
v1.0.13
Current Version v1.0.13
Updated 1 month ago
Last Update on 01 Dec, 2025
Synced 6 hours ago
Last Synced on
Rank
#3,675
—
No change
Active Installs
4K+
-7.7%
KW Avg Position
88.5
+0.7 better
Downloads
37.6K
+5 today
Support Resolved
0%
—
No change
Rating
100%
Review 5 out of 5
5
(21 reviews)
Next Milestone 5K
4K+
5K+
256
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
Need 617 more installs to reach 5K+
Rank Changes
Current
#3,675
Change
Best
#
Downloads Growth
Downloads
Growth
Peak
Upgrade to Pro
Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.
Upgrade NowReviews & Ratings
5.0
21 reviews
Overall
100%
5
21
(100%)
4
0
(0%)
3
0
(0%)
2
0
(0%)
1
0
(0%)
Tracked Keywords
Showing 4 of 4| Keyword | Position | Change | Type | Updated |
|---|---|---|---|---|
| ARIA | 15 | — | Tag | 18 hours ago |
| attributes | 28 | — | Tag | 18 hours ago |
| blocks | 152 | — | Tag | 18 hours ago |
| style | 159 | — | Tag | 18 hours ago |
Unlock Keyword Analytics
Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.
- Full keyword position tracking
- Historical ranking data
- Competitor keyword analysis
Track This Plugin
Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.
Start Tracking FreePlugin Details
- Version
- 1.0.13
- Last Updated
- Dec 01, 2025
- Requires WP
- 6.2+
- Tested Up To
- 6.9
- 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 NowFrequently 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'); } });