Skip to main content
< All Topics
Print

Creating Reusable Content and Using Design Patterns

One hidden feature of WordPress that can be very valuable if you have content that needs to be repeated in several places is to define reusable content components, or what WordPress calls “Synced Patterns.”

My example is the directions to the meeting location of my home club, Club Awesome, which changed recently. I have it on the home page, at the top of each agenda, and in the confirmation message guests get when they register on our website.

Here’s what the address, photo, and map look like as a component on our home page.

Above, I have the Document Overview sidebar on the left open so you can see how those elements are grouped together. If I click in that area, it gives me an option to Edit Original to make a change in one place. A Synced Pattern is actually a separate document that can be embedded in other documents. You make an update once, and it will be reflected everywhere the pattern has been included. (This came in handy when I realized I had a typo).

To create a Synced Pattern, select all the content you want to be included and use the 3 dots (…) menu to choose Create pattern as shown below.

You will be prompted to give the pattern a name — I used the address of the location for my directions pattern — and choose whether you want it to be a “Synced” (checked by default).

Once you’ve created a pattern, you can insert it just like you would insert a block, using the search feature to locate it by name. You can also use the blue + button in the upper left corner of the screen to open up a UI that lists all the available patterns.

Patterns as starting points

I mentioned that when you create a pattern, you have the option of making it synced or not. If not, it becomes a one-way pattern that can be inserted anywhere you like but with the content able to be edited independently of any other use of that content. This can also be useful, if you use the same general content in multiple places but want to customize it. An example would be a pattern you use in speaker recognition blog posts, changing the name and photo of the individual within a standardized layout.

WordPress comes with a variety of patterns you can insert and modify, like the series of image gallery layouts shown below. These are organized into folder. Any patterns you’ve created (synced or not) will show up in the My patterns section.

Table of Contents