Classic vs Block Themes in WordPress

Classic vs Block Themes in WordPress

WordPress has changed the default File Structure of its themes to some degree and these newly structured themes are called Block Themes whereas the older style are referred to as Classical Themes. If you are editing or creating a a theme or child theme then you will need to know a few things about the changes.

(Updated December 2022)

Table of Contents:

Classic Themes

The default WordPress theme for 2023 marks a large change in the way Themes fils can be structured. Most of the tutorials online will refer to themes that look like this. A classic theme file structure looks something like this,

Classic Theme file structure

Block Themes

Block Themes are a new way to structure your theme that have some performance and editing advantages among other benefits. They allow faster sites by not loading all CSS for all blocks in the site and allow you to edit all areas of the site from the CMS.

If the theme you are using is a ‘Block Theme’ then 99% of the instructions on this will still work for you. For example, adding a funcitons.php file to a block theme (because they don’t have them by default) will still work as per the old classic theme system. Some things might have additional methods to edit compared to the classical themes. For example, editing the footer used to involve managing some widgets but you couldn’t control everything in the footer. In the classical theme you had to sometimes edit the footer.php file and required coding and file management experience on the server. In a Block Theme you can edit the footer in the CMS or edit the footer.php.

A Block Theme file structure will look something like this.

“Issues” with new Block Themes:

There appears to be some issues with WordPress developers using Block Themes. In some sense this is quite normal when a long standing software changes the way it does things. In this situation long time users sometimes get frustrated but in general over time developers learn to use the new system in its new form and things continue as per normal. It seems that however that in this case the changes can also lead to increased development time for some tasks for eg altering CSS appears to have become more difficult and time consuming.

I am basing this information on the following thread from Reddit WordPress Group which you can view in full here but some examples of what they are saying is here,

2023 theme has a margin at top and bottom of the page of about 40 pixels. Where is that set? I still do not know. I found someone who figured out how to disable that bunch of CSS with some functions.php stuff.

Reddit WordPress Post

Ran into my share of headaches with making FSE theme. Once I figured out that the settings that come from theme.json are cached and setting WP_DEBUG to true will disable it’s cache, that helped me a lot. Still had issues but this helped me and hopefully it can help you as well.

Reddit WordPress Post

I hear you. My take on WordPress in 2022 is they don’t want you touching it. Do not try to customize. Use the standard features that are shipped with Gutenberg and only try to adjust via the settings they allow you to touch. Don’t go monkeying around with any actual files, don’t open them, and for heaven sakes don’t edit them. I’m not saying I agree with this, but that is the vibe I get from how you are expected to use modern WordPress by it’s maintainers.

The plus side is, if you just create the content and accept the tool and styles as they are provided, it tends to be pretty rock solid.

The negative side is, you have less customization options.

Reddit WordPress Post

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *