Modern WordPress – Yikes!

I’ve done my fair share of whining and grumbling over the current state of WordPress. I simply find it difficult to know the best approach for creating a custom block theme. Do we roll it from scratch? Do we base it off the default Twenty Twenty-Four theme? There’s no good example the same way we were consistently encouraged to go with one of three options: roll your own with a stylesheet and index file, build off another in a child theme, or either pluck something from the Theme Directory or pay for a commercial offering.

By way of Kevin Powell’s newsletter, WordPress developer Dave Bushell wrote a fantastic piece that put words to what I have been unable to effectively articulate about the hot mess that is WordPress theming here in 2024. As far as templating, we can largely forget the Template Hierarchy:

So as a developer, what if you’re asked to change the header template? What happens if you edit parts/header.html*crickets* — that file is not a real template. It’s just a placeholder or reference that may be copied into the database. Once it is, it’s game over.

So how are you supposed to edit templates consistently?

That’s the neat thing, you don’t!

[…]

I think most developers still imagine WordPress themes as PHP templates. Mercifully, you can still do it that way, but what on earth is this new stuff?

David Bushell, “Modern WordPress – Yikes!”

And what about styling?

Some of these styles are hard-coded, others are generated. Some styles exist in files, others in the database. The combined CSS is a tangled mess that all gets inlined into the rendered page. In what order? Who knows. And then bugs crop up so you can never be quite sure.

David Bushell, “Modern WordPress – Yikes!”

Part of me wants play WordPress apologist and explain how this mishmash of approaches is a testament to WordPress to make things as flexible as possible while appeasing a target audience that fails to distinguish between developers and non-developers. But that can’t be true. Simplicity requires making firm decisions with clear directions in order to establish guardrails that prevent developers like me from tripping all over myself. I think many of us were hoping that Twenty Twenty-Four was going to be the North Star we need start modeling our work.

From David’s follow-up:

I tried with Gutenberg, I really did. The Gutenberg block editor was released in version 5.0 December 2018. For over five years I tried. I went all-in from day one. I’ve built dozens of bespoke WordPress themes fully embracing the block editor. Gutenberg is a failed experiment. The core architecture of WordPress is a broken, tangled, unmaintainable mess.

David Bushell, “Modern WordPress – An Update”

Le sigh.

✏️ Handwritten by Geoff Graham on May 13, 2024

1 Comments

  1. # May 15, 2024

    I believe that roots.io way is the true modern WordPress. With composer and using PHP standards.

    I like Gutenberg but as a content editor not a full page builder.

    Reply

Leave a Reply

Markdown supported