Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to create and place a block in Drupal

This guide shows you how to make your own block of content in Drupal and show it on your site.

CMS and Apps2 min read16 steps

What is a block?

A block is a box of content. It could hold a short text, a picture or a link list. Drupal can place a block in a region. A region is an area of the page, such as the header, the sidebar or the footer. Think of regions as shelves, and blocks as the things you put on them.

These steps follow Drupal 8 and 9. Newer versions use almost the same menus.

Steps to create a custom block

  1. Log in to your Drupal site as an administrator.
  2. In the top menu, click Structure.
  3. Click Block layout.
  4. Click the Custom block library tab.
  5. Click Add custom block. If Drupal asks for a type, choose Basic block.
  6. Type a name in Block description. Only you see this name. It helps you find the block later.
  7. Type your content in the Body box. Use the toolbar to make text bold or to add links.
  8. Click Save.

Steps to place the block on the page

A block does not show until you place it.

  1. Go to Structure, then Block layout.
  2. Find the region where you want the block, for example Sidebar first.
  3. Click Place block next to that region name.
  4. Find your block in the list. Click Place block next to it.
  5. A settings box opens. You can change the title, and choose Display title to show or hide it.
  6. Under Pages, you can choose where the block shows. Leave it empty to show it on every page.
  7. Click Save block.
  8. Click Save blocks at the bottom of the Block layout page.

Open your site in another tab and reload it. You should see the block.

Move or remove a block

On the Block layout page, drag a block up or down to change its order. To hide it, click the small arrow next to Configure and choose Disable. Choose Remove to take it off the region.

Tip: Changes not showing? Go to Configuration, then Performance, and click Clear all caches.

Quick recap

  • A block is a box of content. A region is where it sits.
  • Create it under Structure, Block layout, Custom block library.
  • Click Place block in a region to show it.
  • Click Save blocks when done.
  • Clear the cache if you do not see it.