I have a new free WordPress theme out today! It’s called Pulitzer, and it’s a minimal blog theme designed for writers. You can download it from WordPress.org, read more about its features here, or check out the demo.
If you follow me on Twitter, there’s a chance you’ve seen Pulitzer already. I usually don’t write about my themes until they’re live, but I decided to try something new this time. Rebecka was in Stockholm for the weekend, so I challenged myself to build Pulitzer before Monday rolled around, all the while live-tweeting my process for building block themes. If you find that sort of thing interesting, you can check out the Twitter thread here.
The TL;DR of the thread is that I submitted Pulitzer on Sunday afternoon that weekend. While getting it ready in time was my main goal, I also wanted to explore the Block Bindings API that was added in WordPress 6.5. If you haven’t heard about it, the Block Bindings API is a new way to include dynamic output in blocks. You can find a good introduction here.
Pulitzer includes three uses of the Block Binding API:
- One for showing the current year next to the copyright note in the footer.
- One for showing the reading time of a post.
- One for showing the number of comments on a post, with a link to the post comments form.
The kicker? Adding all of these took me no more than an hour, despite me never having used the API before. It’s shockingly intuitive if you’re used to block themes already, at least on the developer end. There’s still work to be done (and being done) on how this is presented to the user in the interface, but it’s undeniably going to lower the bar for building complex block themes. What previously required custom blocks written in JavaScript, or PHP based workarounds with third-party plugins like Advanced Custom Fields, can now be done with a tiny bit of HTML block markup and good ol’ PHP. I love it.
It also raises the question about what is and isn’t theme territory (again). If a user switches theme from Pulitzer to something else, their typography and color settings will (theoretically) come with them, but they can’t bring along the Pulitzer reading time indicator without digging into the theme code. That was business as usual back in the classic theme days, but block themes have started to move towards a complete separation between design and functionality. Adding the reading indicator to Pulitzer knowing the feature is locked to the theme felt like I was doing something illegal. I’m glad it’s allowed on the theme directory, but I hope it doesn’t end up being abused.
Anyway. Pulitzer is out now! I hope you like it. I have been tinkering with another theme design, but it will probably be a while before I get around to building it. And I definitely won’t do it over a weekend.