using generate blocks in the full site editor

The free and pro versions of GenerateBlocks just got big updates. There are not many Gutenberg addons that work well in the Full Site Editor, but after this release, GenerateBlocks is one of them. GenerateBlocks is the only Gutenberg addon that supports dynamic data in the free version.

Video Version

The video has a full step by step walk-through. The written version is a summary highlighting the major points.

GenerateBlocks in the Full Site Editor

Setup

Currently the Full Site Editor doesn’t give you the option to create templates for Custom Post Types. It is possible they will add that soon, but for now there is an easy way to get them added to the list. I’m using a free block-based theme called Bright Mode. The way to add templates is to go to the block theme’s “template” directory and add empty HTML files. Since our Custom Post Type is called “book,” then we add one called “archive-book.html” and one called “single-book.html.”

adding empty html files

Once we do that then they show up in the list.

templates showing in the fse list

The Archive Template

Currently with the Full Site Editor you have to manually add your header and footer into each template, so I start out doing that and then put a container block between them.

The list view of blocks shows all of the ones used and where they are placed. It is very helpful for finding the right level when editing.

book archive in the editor

The Single Template

In both templates some of the fields just have place holders. That is pretty much the norm with Full Site Editing.

book single in the editor

Accessing Dynamic Data

GenerateBlocks have a side panel with the block options for dynamic data. You first toggle it on to indicate that you want to use dynamic data for that block’s content. Then you pick the source, either from the current post or from a post type. Finally you pick the field. If you pick post meta as the field then another input box is displayed where you enter the custom field name.

dynamic data controls for generate blocks

Discussion and Conclusions

One thing to remember is that GenerateBlocks is not trying to be a Gutenberg addon that has a block for everything. The expectation is that it provides the building blocks and some assembly is required. With that in mind, there are not many Gutenberg addons that work well in the Full Site Editor and generate blocks is one of the only ones.

This was all done with the free version. GenerateBlocks is the only block addon that gives you access to dynamic data in the free version. that’s big. One thing you may have noticed is that the number of options from each block is not as extensive as some of the other Gutenberg addons. However, we were able to create our templates without needing to resort to CSS or other means to get the job done. So while there are not as many options, the ones there were carefully chosen – they were the ones we needed. The only thing I couldn’t find was a read more link for the excerpt. Since it turned the entire excerpt into a link I used the core Post Excerpt block.

Here I was just using basic ACF fields. The pro version of GenerateBlocks that just came out added support for more field types. Also, with the pro version the names of the ACF fields show up in the list, so you don’t have to remember them. These are some of the ways they are distinguishing the free from the pro, but for our usage the free version got the job done.

Up to now, you were able to create your templates for Custom Post Types using the GeneratePress pro theme and GenerateBlocks . Now you can create your theme templates in the Full Site Editor using a free block based theme. This extends the utility of free GenerateBlocks even more. By the way, installs of the free version of GenerateBlocks is growing rapidly, and today it has more than 100,000 active installs. So the Generate team is on a roll.

Some of the links in the post above are “affiliate links.” This means if you click on the link and purchase the item, I will receive an affiliate commission. You will still pay the same amount so there is no extra cost to you. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.”

Similar Posts