single-post.html
header

Can I use a reusable block in a template or template part?

Question: Can I use a reusable block in a template or template part?

Answer: I wouldn’t recommend it. Use a template part instead.

  • They’re very similar, but have different purposes.
  • Template parts may be loaded from the theme’s block-template-parts folder.
  • Templates parts and reusable blocks can both be stored in the database.
  • Reusable blocks are primarily for including in more than one post.
  • Template parts are primarily used in templates.

You can convert a template part to a reusable block.

I demonstrated that by loading a template part called zzz and saving it as a reusable block called Zzz reusable block, using Options > Add to reusable blocks from the template part’s toolbar.

File does not exist: wp-content/themes/thisis/block-template-parts.zzz.html

wp-content/themes/thisis/block-template-parts.zzz.html

zzz.html

© Copyright Herb Miller, Bobbing Wide 2021