How to re-use a block

Adding a post or a page is a one-off exercise — you will normally start from a blank page (though I have in mind an exploration of template pages, but that is for the future). But everyone has bits of content to be re-used: a company may have a data protection statement (or an annoying advertisement) which goes onto many pages. In the old days of printing, there would be boilerplate texts to be dropped into the matrix wherever needed (the classic would be the newspaper masthead).

In WordPress, all your pages and posts are made up of blocks: a block could be a paragraph, a bullet-list, an image, or many other options. The Media-with-text block is used in the linescape gallery, but let’s leave that until later in this page.

Once you have created content, look at each block carefully. If you are going to need that block again,

  • use the three dots at the right-hand side of the hovering format menu
  • select Add to reusable blocks
  • give it a useful name
  • save it

When you need the text, image, or whatever again, just select the named reusable block from the green + sign (you can filter to choose from only reusable blocks), and in it goes.

So why not just copy and paste? Because when you have a reusable block, if you change the content of the block (from anywhere it is used), the content is updated everywhere it is used, without your having to chase round updating each instance. The updating includes links, so if you add a link, it percolates through all instances. This makes it really powerful.

The Media-with-text block is even more exciting. We use this block type in the linescape gallery. So why the excitement? This block is actually a block of blocks: the image, the heading, and the text beneath the heading. The heading and text can be edited to generate even more blocks as part of the reusable block. Using each linescape entry as a reusable block means that we can generate filtered lists (though not as automatically as filtering posts by category).

Is there no end to the flexibility of reusable blocks? I don’t know, but I know that one can break a single instance away from the reusable block so that it is different from other instances. Suppose you sell your linescapes for £50 a pop, but your drawing of the dzsámi in Pécs isn’t moving, because nobody else has been there. You can decouple the price block on the dzsámi entry and change the price to £30, leaving all the rest at £50. Alternatively, you could do a deal with the Carlisle Book Festival and offer tickets at no extra charge (you get them at a steep discount) for sales of particular linescapes in the weeks leading up to the festival. For that, I’d create a new block with the price and the free ticket offer, and replace the block, bringing back the usual price block after the event.