Every Sunday, I send out tips, strategies, and case studies designed to help agencies and freelancers succeed with modern WordPress. My goal is to go off the beaten path, and focus on sharing lessons learned from what I know best: building websites for clients. 100% free and 100% useful.
Hi Reader, I still read messages like this in WordPress developer Facebook Groups and Twitter: Clients breaking sites is a common issue for developers. And that’s because block theme development is entirely different to classic theme development. In “old” WordPress, clients couldn’t change their website significantly unless you allowed them to. In modern WordPress, it’s the other way around. Clients can change anything unless you prevent them. And that’s because WordPress users have access to all blocks by default, in every editor. And with these blocks come the default customization options–of which there are many. Therefore, removing any unwanted customization tools should be the first task on any website you build for clients. What features should how you remove? My checklist goes like this:
That is the basis for every block theme project I do. For Hybrid Themes, you should also look into disabling block widgets and the page template editor. How should you go about removing blocks?By default, WordPress shows all available blocks in all editors. Meaning that the content editor also gives access to theme building blocks. The removal strategy, therefore, depends on whether the client should have access to theme and layout blocks. A typical scenario is that you want to remove any theme and most layout blocks from Posts. This post type is all about content. If you use the content editor as a page builder, a common approach in hybrid themes, you can give access to the relevant blocks there. Even if you use a block theme, I would still remove blocks like widgets. Remember that removing blocks does not prevent them from being used in patterns. Because you should only prevent blocks from showing up in the inserter. Do not unregister Core blocks; it’s a surefire way to create bugs. A possible refinement here would be to add an additional layer that targets user roles. For example administrator users can get access to more blocks, and this way, create patterns from blocks that authors might not get access to. Make sure to lock these patterns though. Else authors might remove blocks that they can’t re-add themselves because you filtered them out. How should you go about removing customization options?There will always be customization options that you do not want at all. For those, just remove them using Then there might be customization options that you want for some blocks, but not others. For those you can use Typically I wouldn’t want text blocks (heading, paragraphs, lists,…) to have background color selectors. Because I prefer to use Group blocks for that. This is possible to achieve with just a few lines of JSON. Then we get to the more advanced use cases. What about a client that uses Posts for plain content, and Pages for building layouts? In that case, use the PHP filters for Then I copy and paste this JSON into my PHP filter callback, and use In opposition to Technical implementationWhen I launched the first version of my block theme development course, it wasn’t possible to control the editor experience. This only changed with the introduction of So much that the Block Theme Academy course bundle contains a course that only focusses on this aspect: the Controlling the Block Editor course. It contains all the lessons and code snippets necessary to lock websites down. And as a bonus you get the Bare-bones Starter Theme, which gives you a clean slate to start from. But before you jump onto the implementation, I want you to pause. Because with the right starting points and information, this isn’t too hard. But what is harder is coming up with the approach for how you want to handle things. This depends a lot on the types of clients you have, the projects you build, and how you build these projects. Planning your customization strategySo what I’d encourage you to do next week is analyze your specific needs, and come up with your own starter checklist and theme. It’s fine if it’s not the end all be all. But just get started. Because don’t make the two mistakes I have seen on the last two block theme development projects I worked on:
What’s the better approach? Come up with a customization strategy before the client ever opens the WordPress admin. And if what you gave access to is not enough, you can always add more customization options. But do so deliberately, and sparingly. And you’ll enjoy the same peace of mind as you did in “old” WordPress. Until next week, when we'll dive into a very exciting feature shipping with the upcoming WordPress 6.5 release! |
Level Up Your WordPress Business With One Email Per Week
Every Sunday, I send out tips, strategies, and case studies designed to help agencies and freelancers succeed with modern WordPress. My goal is to go off the beaten path, and focus on sharing lessons learned from what I know best: building websites for clients. 100% free and 100% useful.
Hi, last week I shared a video about how to choose the best starter theme for a client project. One option is to start with an existing block theme (like Rockbase), and then create a child theme to implement your own customizations. And I got a couple of emails from readers that were running into challenges when using block child themes. So this week I want to do a deep dive into the topic of block child themes. Why would you want to use a child theme? With a block theme, you could just use...
Hi Reader, "What is the best starter theme?" is a common question that my readers and students ask. The answer is "it depends". Because there are three options: You choose an opinionated design. You choose a neutral design. You start from scratch. 👉 This video dives into the details Cheers,Fränk P.S. This video is part of a new section I'm adding to my Block Theme Academy course. The focus is on best practices for building client projects. So, if you'd like anything addressed in that section,...
Hi Reader, One essential tool in your toolbox as a professional website builder is source control, also called version control. Source control is the practice of tracking and managing changes to code. This means using Git, often used along with Github to host the code. Why use source control Using Git or other source control tool to manage your code gives you lots of benefits: Versioning: By tracking every change done to a code base, you can understand how it evolved. You’ll also be able to...