plugin-icon

HTML Attributes Customizer for Blocks

作者:NEERAJ K·
Add custom HTML attributes to any Gutenberg block: data-*, class, id, aria, fetchpriority. Dynamic {{variables}} on the front end.
版本
1.0.3
最后更新
Jun 18, 2026

HTML Attributes Customizer for Blocks adds an HTML attributes panel in the block sidebar. Enter one attribute per line as name="value" (double quotes), or a boolean attribute as a single name (for example inert).

Attributes are stored on the block as JSON objects: htmlbacAttributes and htmlbacInnerAttributes (for example {"fetchpriority":"high","data-nolazy":"0"}). Boolean flags use true.

Merging: Duplicate names on multiple lines are combined. Values merge with spaces (semicolons for style). class merges with the block’s existing classes instead of replacing them.

Variables: Use tokens such as {{post.title}} or {{user.auth_status}} inside quoted values. They are replaced when the block renders on the front end.

免费基于付费套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 7.0
这个插件是可用的下载,适用于您的站点。