Block Name, Icon & Category

The name, icon, and category are the three identity properties of a block. They control how editors find and recognise your block in the Gutenberg inserter.

Block Name

The block name is the human-readable title shown in the inserter. You can use spaces — BF Blocks converts it to a slug automatically.

  • Allowed: letters, numbers, spaces, hyphens
  • Generated slug: lowercase, hyphens replace spaces — prefixed with bf-blocks/
  • Slugs must be unique. If you change a block name after publishing, BF Blocks updates the slug — existing blocks on pages continue to work.

Example

Name: Team Member Card

Slug: bf-blocks/team-member-card

Choosing an Icon

BF Blocks supports two icon sources:

Dashicons

Search the Dashicon library by name in the icon picker. Examples: format-quote, admin-users, grid-view. See the full list at developer.wordpress.org/resource/dashicons.

Custom SVG

Upload a square SVG file. BF Blocks inlines it as the block icon. Keep SVGs simple — complex gradients may not render correctly in the inserter.

Block Categories

Assign your block to a category to group it in the inserter. WordPress includes these default categories: Text, Media, Design, Widgets, Theme, Embeds. BF Blocks adds its own BF Blocks category — useful for keeping your custom blocks together.

Registering a Custom Category

Add this to your theme's functions.php:

add_filter(
  'block_categories_all',
  function( array $categories ): array {
    return array_merge(
      $categories,
      [
        [
          'slug'  => 'acme-blocks',
          'title' => 'Acme Blocks',
          'icon'  => null,
        ],
      ]
    );
  }
);

Once registered, your custom category appears in the BF Blocks category dropdown and in the Gutenberg inserter.