GeneratePress: Templates With WordPress Blocks

WordPress is all-in on the block editor. There’s no going back.

While it may not have all the bells and whistles of third-party editors like Elementor or WP Bakery, it has a few things going for it. Block data is encoded right into the post content, making block editor pages really fast. Data doesn’t get stored in separate post meta fields, which means no extra database queries to build out the page content.

One other huge benefit is the same one that WordPress has leveraged from the beginning: its open-source nature. WordPress knows that the biggest advantage it has is the army of developers that can and will build on top of the WordPress system, fleshing out new features and expanding its reach ever further.

The Block Builder as a Building Block

Right now, GeneratePress seems to be leading the charge. The Elements system in the GeneratePress Pro plugin has drastically expanded the realm of possibility for the block editor. What is by default a one-off page building tool is expanded by Elements into an entire templating system. Single and archive templates, headers and footers, sidebars and navigation menus; all of these things previously landed in the domain of PHP template files located within themes. The promise of full site editing doesn’t seem to have been realized since we wrote about it last year, leaving GeneratePress Elements to lead the charge in meaningfully-expanding the block editor beyond post content.

Dynamic Content

Essentially, Elements allows you to use the block editor to build out templates for various parts of your website, using a dynamic data system to fill in the content based on the data attached to a specific post. Dynamic Content allows you to insert data from a post (title, content, metadata, etc.) into a block, allowing you to use the same group of blocks to display different content depending on the post that the user is currently viewing. Build it once, use it many times.

Better Blocks

The tool also goes hand-in-hand with the GenerateBlocks plugin, which provides enhanced core structural blocks that put their default WordPress equivalents to shame. Where default WordPress blocks like columns and headings can seem unintuitive to use and limited in terms of customization, GenerateBlocks provides easy-to-use, highly-customizable replacements for these features. The three or four block setting options available to most default WordPress blocks seem positively primitive compared to the tens (Hundreds? We lost count.) of block options available to GenerateBlocks. Many of the settings are shared between blocks, keeping things consistent and making it easy to familiarize yourself with how the system works.

Better Templates, Built Easier

The Elements system isn’t just a replacement for the age-old PHP theme templates that WordPress developers are all too familiar with; it expands what’s possible with customizable Display Rules. Want to have a different post template for logged-in and logged-out users? No need to fold two separate templates into a single PHP file using if/else statements. You can create two separate templates within Elements, set the display rules to differentiate between logged-in status, and then build everything out using WordPress blocks. Elements pushes the limit of tailoring your theme exactly to different groups of users, and does it while making the whole process incredibly accessible to the average WordPress user (i.e. not just us developers).

Blocks in the Loop

The system isn’t just limited to singular content types either. It’s not just possible but borderline easy to tap into the WordPress loop using blocks. The Query Loop block included in GenerateBlocks acts as a container for individual blocks that make up a single item in a feed. Inside the Elements system, the Query Loop block can be used to built out archive pages and other types of post feeds.

Overall, the block editor hasn’t seen much change since its debut a few years ago. Many would argue that compared to the third-party visual builder competitors (the competition that inspired its very creation) which are constantly adding new features, the WordPress editor hasn’t lived up to its promise of making the default WordPress editing experience the superior option.

However, that line of thinking ignores the very thing that made WordPress the dominant CMS all across the internet. WordPress isn’t about one team doing it all; rather, its job is to lay the groundwork for any other developer to build on.

With the way that GeneratePress Elements has taken the block editing experience and run with it, the future certainly looks bright for building with blocks.

Work With Us

We've been building websites for over twenty years, and have learned a thing or two about how to make web projects go smoothly.

CLOSE