Themes set up for a paradigm shift, WordPress 5.8 will release tools to make it happen – WordPress Tavern

0


For much of the history of WordPress, the fundamentals of creating a theme have been slow to change. Every now and then, developers would get new functionality, such as child themes, featured images, navigation menus, and template elements. Each of these was epic in its own way. However, theme authors have had ample time to adjust to these unique feature introductions.

When the Block Editor landed, it did so with a bang. Love it or hate it, it’s changed the way we think about web design. It wasn’t one of those one-time improvements, no matter how many times we’ve been told it will “work” with any theme. Sometimes it doesn’t work technically break things. Support and integration are necessary for an ideal user experience, and theme authors have been slow to catch up.

With WordPress 5.8, theme authors are gearing up for another set of paradigm-shifting changes. Josepha Haden Chomphosy, executive director of WordPress, announced last week that several Full Site Editing (FSE) subcomponents will begin shipping with the next release.

In the latest episode of the WP Tavern Jukebox podcast, Nathan Wrigley hosted guest Anne McCarthy. He asked her to allay people’s fears about the changes to come. “So, as an example, let’s say we’re a theme developer. We may fear that themes will become a thing of the past, that the livelihoods we have created for ourselves will disappear before our eyes.

This is a common question. Since the inception of Gutenberg, especially its features which fall under FSE, internet users have wondered if there would be a place at the table for them. If WordPress evolves into a bigger page building experience, where do the themes fit? If users can change the layout or manipulate any styles, what’s the theme’s job?

These questions are finally getting answers. We can see the real world changes introduced in recent months. They paint a much clearer picture, defining the role of themes in the future of WordPress.

“And for theme authors, themes are going to be so important in a whole site editing world,” McCarthy said. “And one of the things that excites me so much is that there’s going to be a ton of what they call… the idea of ​​these hybrid universal themes that can work with, say, editing. models. “

It refers to a recent discussion that makes some distinctions between universal and hybrid themes. Essentially, Universal Themes would work in both a classic editor or block editor context, depending on what the user chose. A hybrid can take over parts of the bouldering experience, but has a way to become a universal theme that fully appeals to any user on the go.

While this doesn’t fully address the concerns of theme authors, these are the basics that Gutenberg contributors are thinking about. First of all, they want a solid user experience. However, discussions show that they also recognize that theme developers need to embrace new things at their own pace, take charge of features as they understand them, and learn how to implement them. This allows traditional themes to move into the new era and build themselves from scratch with new tools.

Themes just might be more vital to the future of WordPress than they were in the past.

New tools coming in WordPress 5.8

The site editor and global styling features are not intended to ship with WordPress 5.8. However, the next version is expected to introduce powerful tools for theme authors. It will be a pivotal moment for theme development companies wishing to establish themselves in the space. The right team with a forward-looking mindset must disrupt the market and make millions. And, there’s room for writers who just want to create cool stuff.

It all starts with the new model-related blocks that should be activated in the next major update. In particular, the Query block provides an alternative to what was previously only possible through code and carefully crafted theme options. Coupling it with existing features opens up a world of possibilities.

For example, I picked a theme from the most popular listing on WordPress.org that seemed to have one of the most complex query and loop setups in the bunch. This is the EnterNews home page:

Home page design with various post sections for a news website.
EnterNews WordPress theme homepage.

Anyone familiar with developing themes can tell you that it would take at least eight different queries to create this homepage design without looking at the code. The only way to create this and allow users to customize the posts that display is through a series of theme options (likely drop-down select boxes based on categories).

If Query Block ships with WordPress 5.8 as expected and is also enabled for any theme, suddenly this layout is possible right from the Block Editor – no site editor needed. Via block templates, users can insert these “sections” from different query blocks into their page and rearrange them. However, this requires buy-in from the theme author.

As I said earlier, theme authors have been slow to embrace block-related functionality as a whole. Without a doubt, the EnterNews home page system is already doing the job. And, if it works for the theme’s current user base, there may seem like little incentive to change.

However, the transition to a new system has real advantages. The most obvious is that it requires little code compared to the PHP needed to create customization options. Block templates are little more than HTML with chunks of JSON configuration in the mix. Developers can literally build them from the editor and copy / paste the piece of code.

By writing less code, it reduces the potential for security issues and other bugs. Theme authors can also be less rigid in their design, allowing users to move layout elements around.

The Query block is not the only one to be included in 5.8 outside of a block-based theme context. Navigation, site title, site logo, etc. are ready to ship. Most of these blocks are vital components in creating an entire page. Theme writers could start handing over the tools to create complex landing pages on launch day in July.

Springboards

Decorative image of stepping stones between the reeds.

Not all theme authors need to step up and try to revolutionize the thematic space – although I look forward to those who do. Others may want to take a more measured approach. FSE is a bunch of many subcomponents, some of which ship with WordPress 5.8. Many of them don’t require developers to accept them. They will “just work”. Kind of. Most.

Users will be able to switch to model editing mode directly from the block editor. From there, they can create entire page templates of their choice. Theme authors can either get in their way by not styling the blocks or make the experience more enjoyable.

Widgets screen and customizer will allow end users of traditional themes to insert blocks into any of their sidebars. Some theme authors will need to take this into account in their designs. HTML output can disrupt some layouts. For those who are not ready, they should turn off support for block-based widgets.

The most crucial tool, however, is completely optional for theme authors. This is the introduction of theme.json Support. the theme.json The file is the cornerstone of the theme’s future development. It acts as a config file for block settings and styles, allowing theme authors to set default settings for everything.

In a nutshell, theme developers can configure any of the blocking options for this file, and those options are handled automatically in the editor and on the front-end.

Themes can also set defaults for block options that do not yet exist in the interface. The system will automatically display them as styles, even though users cannot edit them in version 5.8.

Again, this means less code work for long-term users. While there is probably always a place for custom CSS, some themes could basically be built from theme.json configurations. It is not possible today. However, theme authors can start to take advantage of this tool.


The themes do not go in the direction of the dinosaur. All that overly complex PHP code work that was needed in the past just might be. The change consists of putting the themes back in their place: the design. Previously available tools such as patterns and styles associated with new parts such as theme.json and the blocks linked to the models will form the backbone of the new system. Everything begins to come together.

The transition will take some time, and each facilitator will have to decide for themselves how much they want to engage. But, the time is near. I could even run the old code editor and start building a project myself. There has never been a better time to be excited about theme development than now.



Source link

Share.

Comments are closed.