WordPress

What is the difference between a block theme and a classic theme?

BIG linden / Support Docs / What is the difference between a block theme and a classic theme?

WordPress

Q:

We are creating a new custom WordPress theme for our website and trying to decide between using a block theme or classic theme. What are the differences, pros and cons of each?

Issue

The client would like to know the difference between a Block theme and Classic theme in WordPress and which might be right for their new website.

What is the difference between a block theme and a classic theme?

What is a Block Theme?

“Block themes are sometimes called full site editing themes. A block theme is a new theme that you can use from WordPress version 5.9. It is built mainly using HTML and a theme configuration file. The block theme is composed entirely of blocks, allowing you to edit all parts of your site in the Site Editor” explained the development team.

What is a Classic Theme?

“A classic theme is the original theme, without version limitations, that primarily uses PHP, JavaScript and CSS. Classic themes take advantage of WordPress PHP functions, hooks and filters” explains the WordPress development team.

What are all the differences between block themes and classic themes?

Classic themes and block themes have many similarities, but also differ in some key ways. Classic themes use PHP files to display content and parts of the page, while block themes use HTML files to display blocks.

Classic theme developers can use widget areas (sidebars) and widgets, while block theme developers must rely on blocks instead. In terms of template hierarchy, both types of themes follow the same structure.

For WordPress custom theme developers that are accustomed to creating classic themes, this comparison table below looks at all the important distinctions between the two and provides great insight into what makes the two methods for development different.

Classic themes:Block themes:
PHP files to display parts and site contentUses HTML files to display blocks
Uses PHP files as a fallback if WordPress can not find the HTML file
single.html is the equivalent of using single.php
Uses the standard template hierarchyUses the WP template hierarchy
Uses PHP functions such as template tags to display contentUses blocks for everything
The post content block is the equivalent of using the_content()
Use PHP functions to make text translatableText in HTML files is not translatable
Block patterns can use PHP functions to make text translatable
Uses PHP functions for if/else conditionalsUses block settings to achieve different results
Uses the loop to display different posts and post typesUses the query block and the post template block
Can use widget areas (sidebars) and widgetsUses blocks instead of widgets
Widgets included in WordPress have been converted to blocks
Can use the CustomizerUses the Site Editor. Can optionally enable the Customizer menu
Must register a navigation menu to include a menuUses the navigation block
Can register a custom headerUses blocks to fully customize site headers including images
Can register a custom logoUses the site logo block
Can enqueue custom CSS and scriptsCan enqueue custom CSS and scripts but relies more on blocks and the theme.json configuration file
Can use theme.json, but theme authors need to enqueue the styles for the front.Can use theme.json, and the styles are enqueued automatically to the editor and front
Can place template files in the root directoryPlaces template files in the templates folder
Can place template parts in any directoryPlaces template parts in the parts folder
Can not create and edit site templates like 404 and archive pages in the Site EditorCan create and edit site templates like 404 and archive pages in the Site Editor
Can create and edit block templates in the Template Editor with theme supportCan create and edit block templates in the Template Editor
This table shows the 17 key differences between Classic themes and Block themes.

Additional reading

More articles about WordPress

More articles related to .

Capabilities related to WordPress:

Prevent attacks, regain control of your WordPress website with Enterprise security solutions.
Move your website from Wix to WordPress and get the website you need.

REQUEST A 1:1 CONSULTATION

Get a 30 minute 1:1 consult with a BIG consultant and get a 7 page report on making digital work in your organization with key insight into paths for success and playbooks just for your unique needs.

Please understand not all requests can be met. Please contact us with any questions.