Unlock Hidden Power: 6 Little-Known Ways to Master Custom Block Styles in WordPress
Plugin developers can use the style_data
parameter to achieve similar results, including integration with Global Styles.
Other plugin-based methods—using inline_style
, style_handle
, or JavaScript—don’t support Global Styles editing, but still make the styles selectable in the editor.
Keep in mind that the first three methods (JSON file, theme.json
with PHP, and style_data) require WordPress 6.6 or higher. To support older WordPress versions, you’ll need to use one of the other available approaches.