Categories
Beginners Quick guide

What is a custom block style?

A custom block style is a style change that is applied to a WordPress block to make it look different from the default styles.

The difference between a custom block style and a custom block is that the style is added to existing blocks, while custom blocks are new blocks. It is usually simpler to create custom styles than entire blocks.

The block style can then be selected in the WordPress editor:

An image describing the settings for the gallery block in the WordPress editor. A new block style called Hide captions is available for selection.
Example of a custom style added to a gallery block.

How a custom style is added

You can add block styles with either PHP or JavaScript combined with CSS. The style is used both in the editor and the front.

If you want to know more, you can continue with these two guides: