The Pros and Cons of Using Block WordPress Child Themes
Welcome to Press This, a podcast that delivers valuable insights and actionable tips for navigating the ever-evolving world of WordPress.
In this episode, host Brian Gardner and Automattic Developer Advocate and Core Contributor Nick Diego explore the nuances and benefits of using child themes with block-based WordPress.
Powered by RedCircle
Brian Gardner: Hey everybody, welcome back to the Press This podcast. I am your host, Brian Gardner. I am a WordPress advocate at WP Engine, and it is my job to spend my day talking and thinking about conversing with WordPress.
In the last episode, we discussed some of the points of the WP Engine acquisition of NitroPack and what it means for a faster web. That was exciting. But I’m excited about today’s show, one from a content perspective and two from a guest perspective. And so, let me first introduce you to Nick Diego from Automattic. I’ll let you introduce yourself, Nick; go for it.
Nick Diego: Thanks for having me, Brian. I am a full-time contributor to WordPress, sponsored by Automattic. I focus on developer relations and helping to bridge the gap between the community of developers and users and the engineers building WordPress itself.
Brian Gardner: Before we go any further, I want to hone in on something you just said because it makes me happy. Even though you’re in developer relations, you just said you focused on developers and users—and this will be a good segue into our conversation today—because WordPress powers 43% of the internet.
There’s so much depth of users within WordPress. And so what we’ll talk about today is that we’ll cover both sides of the spectrum because there’s some stuff in between because there’s a lot of considerations. And so before we go further, thank you for listening, everybody.
Today, we will discuss child themes, which are near and dear to my heart. It’s been a pain point in my life dating back to the beginning days of Genesis, of which I think Nick, you go back, or at least mostly back, because I know you did stuff built on top of Genesis as well.
And so, in a new modern WordPress era, in light of how block themes are and how WordPress sites and block editors are, let’s talk about child themes. And I will open this up just like the wide-open question. From there, we can pick. And I know where you’ll start. Nick, what do you think about child themes? What are your initial reactions when you hear a child theme in light of the current status of WordPress?
Nick Diego: As you mentioned, I started building with WordPress on top of Genesis. So, the concept of child theming was ingrained in how I first approached WordPress. You install the Genesis theme, and you build a child theme on top of that. You know, that’s just how we built it.
As we’ve been transitioning into a block theme world, you can still easily make child themes. However, I found that there is less of a need for child themes in my theme development. I typically will take a block theme and either build one from scratch or take one and modify it directly. And then that’s my new theme.
But it’s important to stress that we’re discussing block themes because we’re working in a block. It doesn’t mean that you should use a child theme or you shouldn’t use a child theme. I can speak more to that as we progress in the conversation, especially around WordPress.org, transitioning to a block theme structure with a parent-and-child setup.
Brian Gardner: Yeah, that is one of the things. I also like what you said about your workflow. Sam, our friend, often says there are many ways to use WordPress. That’s very accurate. And that’s important, especially for those who have followers or—I hate using the word influencers because it’s not like… I don’t love that word.
But people who influence the WordPress space, when they say definitive things, in their perspective, will say things like, “this is the new way to do a thing, or this is how it should be done.” And I object to that, and I try myself not to do that. And I always, like you, try to caveat my opinions, like “this is what works for me. This method is how I do things. It’s the right way for me, but there might be better ways for you.”
And so, I encourage people as they talk through things and have these conversations, whether it be opinions on Twitter slash X, or just on podcasts or whatever, always to make that sort of note that there are many ways to use WordPress, and here is a way that works well in my workflow for the needs that I have. As we’ll discuss, users or developers have very different needs. I just wanted to acknowledge that. So, thank you for bringing that perspective.
This is when Matt talked about Gutenberg 5.0 and all that. One of the reasons I became unsure about the future of it all was back in the days of Genesis, we had built the framework, and the child themes were opinionated designs, the CSS, that kind of thing.
As Matt cast the vision of Gutenberg, what I started to realize was much of what he was casting. And I use the word cannibalized because it cannibalized the value proposition that Genesis itself could, you know, hooks and filters and sort of move things around and do things in a bit more accessible way and in a no-code way.
My opinions on child themes started to shift once Gutenberg landed, and Core incorporated a lot of that functionality. If WordPress core becomes the framework, is there a need for a child theme? If so, what does that look like? I want your perspective regarding the shift from classic WordPress to block-based WordPress and things of that nature.
Nick Diego: Yeah, that’s an excellent way to frame it. Core is taking on a lot of responsibility, like Genesis did. If I look at it again, this is my opinion. If you want to build a block theme differently, by all means, but if I’m creating a theme for my site, I will develop that theme as a standalone theme.
Now, if I need to build another similar site, I may take the theme, copy it, and then make the modifications I need for my new site. So, you have two separate themes. I like that approach, and because we have so much standardization around how the theme.json file works and how you will register block styles and variations, the two themes are relatively similar. You don’t need that layer of abstraction of a parent-child. It just becomes more accessible to have a separate theme.
I will caveat that it depends on your setup. I alluded to WordPress.org earlier, and WordPress.org is transitioning to a block theme architecture. The way it works is that WordPress.org comprises multiple individual sites.
And so there is a parent theme, a parent block theme with a lot of functionality built into it. And that lays the foundation for every site. And then each unique site, you know, has the plugins repository and the themes repository and news and all these different pieces of WordPress.org, they are child themes that sit on top of their unique, as you were mentioning, similar to Genesis, their unique styles and, you know, unique functionality for those individual sites.
Both are very acceptable and reasonable approaches, but it depends on your workflow and how you want to manage the architecture of your site builds.
Brian Gardner: So many conversations have come through the product lens. You’ve built and sold similar products because you and I are innately product-minded people. And so I generally have always, I mean, StudioPress was a 2006 starting point. So, for the better part of 18 years, my brain has always gravitated towards building something consumed en masse.
That is a different perspective than building a custom site for your parents, or the idea of creating a child theme for your parents on top of parenting seems silly. But from a child-themed perspective, let’s bring this into the modern WordPress era because it’s almost three-dimensional. In contrast, the classic world is two-dimensional.
So, as an example, I would build a theme, and in my head, I’m like, OK, well, there’s a lot of, you know, the core template files, the core theme.json styles and settings. It’d be nice to do so because I gravitate just out of the box, thinking, OK, I build something plugged into. Then, you create many designs outside the original base or parent theme.
What I need help with the most is that one theme can do anything you want it to. If it starts simple, you could bend it through the site editor, global styles, and everything else. That’s the intent of WordPress, where you can add more templates and create new color palettes.
But the struggle is that I can do that because I spend 24 hours a day doing this stuff. However, the end user, even a developer who knows WordPress, has yet to arrive. Then, you have to deliver a child theme. So, what they see on the demo gets delivered to them on activation. Let’s talk about that briefly because part of me wants to show tough love and say, let me show you how to fish. And then the other part of me is like, people say, well, I want what the demo is. Why is my header not like that?
You have to create a child theme more like what they see when they activate it. This fact might lead to a conversation like WordPress’s onboarding piece. We won’t go there today, but talk about that a bit; it’s a struggle.
Nick Diego: It should be as easy as possible for users so that struggle resonates. Let’s make it easier for users to get started. Watching people who have never used WordPress dive in can be more complex than competitors.
I’m always inclined toward making the user experience the best. Taking it a step further, though, I think that child themes—just personally—add a layer of complexity for users because you have. Then, they need to start understanding what a parent theme is, and then you install a child theme. That’s a level of abstraction that is also confusing.
If this were a personal product, even in my workflows, let’s say you take two themes, and they’re very visually different, but the underlying architecture is very similar. So, it could be a situation where you have a parent and two child themes.
I would create two themes to make it easy for users. You shift the challenge and burden of building the two themes to the developer, so they must maintain two instead of a parent and child theme. The user sees the theme they like, likes it, installs it, has one theme on their site, and is off and running. That’s how I would structure things.
It’s more challenging from a maintenance perspective as a developer because if you want to make, let’s say, a simple change that you would naturally make to a parent theme, now you’ve got to make it to the bowl of two complete themes. So, there are some trade-offs there, but I would hedge towards the user.
Brian Gardner: So Nick has had either the pleasure of getting inside my head whenever I want to talk through this. I talk about this often because what you said is like where I’ve been. However, I wanted to make it easier for people to consume. You make a child theme, but then suddenly, you start discussing creating a block theme and saving changes. And this is where we get into the third dimension of WordPress.
The whole idea of making changes via the site editor puts those changes in a different place. And so I had someone email me the other day, and they’re like, so if I use this base theme and then activate this child theme and then make a bunch of changes in the site editor, it was kind of like, who’s on first, right? And then I was like, do I make a grandchild theme? And I was like, wait a second, all of a sudden this, now we’re in inception.
Finally, to the point you made earlier, the challenge of why Genesis was its thing back in the day was that I didn’t want to have to maintain 30 different theme.json files that are essentially all the same. But this is where I’m currently at. I joked with my friend Jeremy; that was how I felt today, which could change in an hour.
Now I’m like, maybe it’s just having a basic base theme and forking it until it’s standalone opinionated themes. Yes, the burden’s on me to maintain that. But at least this way, it’s like one person, one theme; if they make changes, they’re within one theme and don’t go across two themes. I don’t have to worry about a base theme update from .org; seeing all that becomes easier.
If there’s anything specifically to discuss, we can go into the next layer: the Create Block Theme plugin and what that does. I’ll let you introduce that a bit because I’ve been fascinated by its current state. We’ve talked about this at Build Mode. All of a sudden, it’s changed the way I want to help educate people.
Nick Diego: Before we move to that, I want to mention child themes. There’s a very interesting use case for child themes in enterprise-level implementations. I say enterprise, but I use that term loosely. It could be a big university with tons of sites or WordPress.org or something like that, where you are not, you’re using a block theme or perhaps a hybrid theme, and you have an implementation where your users aren’t changing that much in the site editor. You’re, you know, you want to keep everything in version control, and you’re deploying these things. You know, developers are deploying these things. It’s not a user going in there and starting to change things.
That is where a parent-and-child theme setup makes much sense regarding controlling the infrastructure across all your sites. And that is a very valid approach. One that I’ve seen deployed quite a bit. But as we’ve discussed, when you’re talking about child themes from a product perspective, the idea is that we’re moving away from child themes. Speaking to, sorry, go ahead.
Brian Gardner: This is a brilliant segue into the Create Block Theme plugin. And what you just said, your example of WordPress.org having its own thing and sort of like the enterprise level, I’m starting to encourage people who I think are capable enough. And when we talk about that, it’s different than taking somebody else’s base theme and building many child themes on it. We’re talking about a system that should be used and created, not from scratch. You could take a base theme and fork it or make it your own. Like 10up or WebDevStudios, they should have their base theme so that they can control it. They control how it works and the updates. And they’re not at the mercy of the decisions of people like me who want to change things occasionally. And so, in that context, yes.Create Block Theme is a great introduction. How does one take someone else’s theme and make a theme of one’s own? I’ll let you start with that.
Nick Diego: I don’t know the genesis of the Create Block Theme plugin, but you can install it from the WordPress plugins directory. Once the plugin is activated, you’ll see a suite of tools available in the admin panel and the site editor. It allows you to back up. When you make changes in the site editor and click the Save button, those changes are saved into the database.
One of the biggest benefits of the Create Block theme is it allows you to take all those changes and write them back to the actual theme files. It will enable you to modify the theme you’re using without touching a line of code. It also allows you to create a copy of the theme, create a child theme, and do all sorts of things to create a block theme, as the kind of the name of the plugin suggests. But what it does is it takes something that was, if you took a new user and you said, build a theme from scratch. It’s a daunting prospect.
But instead, if you said, take the new base 2024 theme or take, you know, a theme block theme out there that you like, install it and install the Create Block Theme plugin, start making modifications to that theme in the site editor, doing everything without any code.
Then, click a few buttons to place those changes in the theme file. You can also download the theme that you’ve just created. That’s a powerful thing. And as we look ahead, there’s a lot of improvements that are, you know, kind of being under discussion around the Create Block Theme plugin, around, you know, pattern management and different functionality there that supercharges the ability to build a block theme really, without touching a lot of code. It’s an excellent tool for getting people to create themes quickly.
Brian Gardner: As you know, we host Build Mode every Friday. It’s for anybody interested in talking about the business of WordPress and all of the evolutions and changes we see with WordPress. In the last several weeks, we have been screen-sharing and investigating what the site editor is. How does it work? How can you make changes, and so on? And so, last week, I installed the Create Block theme on a local install of mine.
Quick shout out to our Local development tool. And so, and this is something that I struggled through a little bit with everybody on there because I didn’t realize it was a thing, and I didn’t know, as it’s very much suggested, one of the options as well is to create a blank, start with a blank canvas literally. So yes, you could take your existing active theme, clone it, and create a child theme.
But you can also create one from scratch, and what that looks like is it generates the theme folder, the blank style sheet with like the header information at the top, and the index template is the only one it starts with because that can control everything. It’s all unformatted. You need to go in and say I got to establish my color palette, so I’m going to add these colors rather than replace the ones that come with the theme that you’re using. It was an exciting and eye-opening experience. Those who want to start with a blank canvas and create their theme could do that and then export it. Many things are coming with the Create Block Theme, which has slightly changed my perspective on this.
With the people on Build Mode, there’s some pretty good seniority there. Many people have tenure in WordPress development, so they understand how it works. But two weeks ago, I asked the question because a lot of people are, you know, we’ve got Peter, who uses Kadence a lot, and many people are using other similar tools.
Let me ask a question because I have a hypothesis that was proven wrong when I asked the question. And then I went on Twitter and pulled this too. We call them either theme implementers or developers. Are you more interested in developing client sites with a code or no code sort of process? During Build Mode, many people said they were good with using the tools inside the dashboard and the site editor. I don’t want to learn theme.json, and I don’t get it. And I’m afraid of it and things of that nature, which a quick shout out to anybody who’s going behind the scenes. Once you understand how it works, it’s pretty simple to sort of master.
Most people on Build Mode said starting with a base theme and building a client site using the site editor would be OK. And so that’s why we’ve, you know, uncovered some things and why we’ve explored. And I was shocked by that response. The intent of WordPress is more from a user perspective. Still, I think there are a lot of people from back in the Genesis days, a lot of people will call them implementers, whether it be Genesis implementers, we call them Genesis developers, they’re basically taking the theme and making a few tweaks and, similarly with Elementor and some of these page builders, most people are just, they’re not touching code. They’re just downloading Elementor, putting it on a client site, bending it to the way the client wants, and calling it a day.
Why should WordPress be any different? But I was surprised by that. And so it altered my plan. Cause I was like, I was building for and teaching people how to do it and code, and only a few people want to learn in code.
Nick Diego: Yeah, and I don’t know, I’m the same. I can build the theme from scratch, but if you don’t have to, why should you? Anecdotally, I’m building a small site for a friend. I’m touching the least amount of code possible. You know, I have a base theme already. I’m going into the site editor and building the whole thing out, modifying all the templates, doing everything visually, and then using the CreateBlock theme or simple copy and paste to write that back to the theme files. So, I’m not touching any code. I understand how it works. It is essential to know how things work under the hood. But you don’t have to touch any of that.
I participate in a series called Developer Hours. And we will have one on August 27th with community members such as Peter and Tammy Lister. That will be all about the Create Block Theme plugin, where it’s heading, and what you can do with it. So, it is one of these tools that is more than just some plugin sitting out there. It’s becoming a fundamental tool for building block themes, making it much more manageable. It abstracts away some of the complexity that things like theme.json can be pretty complicated. But one of the things I love about it is instead of having to learn all that the folder structure and theme.json, instead of having to learn all that upfront, you can dive into Create Block Theme, mess around with it, build your theme, and then slowly, over time, get an understanding of how things work.
Brian Gardner: Yeah, that’s a good point because, and this is where, you know, as we head into 6.7, well, we’re already headed into 6.7, but 6.7 and beyond. One of the things I appreciate most about the efforts of those who are working on marrying it up because of the Create Block Theme plugin. Much of the promise with Create Block Theme and the number of people who want to use that sort of build tool depends on whether or not, and this is what I want to sit on for a minute, whether or not the user interface within Site Editor matches the capabilities of theme.json.
Because if there’s a one-to-one, that’s a brilliant system. But if theme.json can do some things, we’ll say that the Site Editor doesn’t have a UI, then there’s a reason to make people go into theme .json, like if they want to tweak a border. And so one of the things I know will be coming in 6.7 makes me the happiest. But when I see them come through GitHub, I’m like, wow, this is what the people need—a UI added to the site editor for modifying font sizes.
Theme.json can establish the font size system. You can determine if you want that size to be fluid, what it’s called, and everything else. If you think about it, 80 % of the people who are tweaking a thing want to change the size of the fonts. And if they can’t do it inside of the dashboard, then you’re forcing them to cross over into the code, and then it becomes murky. And so I appreciate the efforts around harmonizing what’s making a corresponding UI inside the site editor for anything in theme.json. Once you have that parity, suggest that people use the Create Block Theme plugin. Without revealing trade secrets, will Create Block Theme’s functionality eventually become part of WordPress Core?
Nick Diego: That’s a good question. I want to back up quickly before I answer about the one-to-one between theme.json and the site editor. Anything that revolves around the visual aesthetic of a theme, such as the available fonts and font sizes, as you just mentioned, should be editable within the site. There is functionality inside theme.json that is much more advanced; that would not necessarily be necessary. It needs to make sense to be in the site editor. Namely, in the site editor and theme.json, you can restrict functionality on different blocks in the settings section. So, I don’t want heading blocks to have color controls. You can do that in theme.json.
That is a pretty advanced need that the average user just building their site wouldn’t need. And so, there are things in theme.json that will never be in the UI simply because they’re like the advanced things that only a developer or a person building something for a client would need. The Create Block Theme functionality can likely be implemented into Core. It’s also a perfect place to try out new things. We mentioned pattern management, which is being able to add new patterns, save new patterns, delete patterns, and manage patterns.
There’s been some discussion around implementing that in the Create Block Theme plugin as an initial first step. There’s a natural pathway between the plugin and Core. It’s just a matter of time. We’ve seen tremendous improvement with the site editor over the last few years. However, there’s still a long way to go, especially as we have more harmonization between the post editor and the site editor and some of the admin redesign work that’s also going on.
Brian Gardner: It’s important to note that some of that functionality is now part of WordPress Core. My understanding is that there’s an option to export the theme in WordPress Core as it stands. There needs to be an interface like Create Block Theme. If you hit the export theme, your work will be bundled. It doesn’t allow you to clone it; it doesn’t allow you to create a child theme, and so on. But at a minimum, if you install a theme and do some work, you want to export it for use on an existing client site. For people who are listening and interested in all of this, spin up a local install and make some changes to a theme, export that, and put it on another local or a client site and see how that works. Cause that’s already there and should work for many use cases.
Nick Diego: The Create Block Theme plugin is a fully open-source community plugin run by core contributors. So, if you want to test it out, contribute to it, work on it, open an issue, or do whatever, it is a tool to make block theming easier. For those listening, it’s a great way to test it out. If you want functionality, open a feature request.
Brian Gardner: That’s a good call out for contributing. There is a misconception: I can’t, I don’t write code. I can’t contribute to WordPress. Right. And there is so much to like what we discuss on Build Mode. Those who write code are only writing code based on things that they think or teams internally have discussed, but also things that the community has asked for. As you said, just creating an issue and saying, Hey, it would be great if this functionality was part of either this plugin or part of Gutenberg or WordPress Core, and then conversation happens. And then somebody says, I can write that code, and I like this idea. And so for those looking for ways to contribute, there are all kinds of ways, but sometimes, if you have an idea or clients that continually ask you for the same sort of thing or functionality. It’s only better for you if that gets put into WordPress Core. Then, you don’t have to build a hack or do something special for every client you’re creating.
Nick Diego: And I want to stress that not opening an issue is second nature to Brian and me, but if you’ve never opened an issue on GitHub before, please feel free to reach out to either of us, and we’ll help you get started. Because GitHub is a foreign land for many. So, we understand that. So we’re here to
Brian Gardner: And also a quick note that it’s not always a guarantee or slam dunk that just because you put something in there, a feature request that it gets accepted. There might be several factors or reasons for it being a better idea. So go into it with a, take it all to the grain of salt that it’s there to improve the software, but this is not your personal wishlist item for everything you want because it does power 43% of the internet, and there are considerations elsewhere.
We could continue to talk about this for days and days and days, but this is a good foundation for at least discovering some of the current capabilities. Again, you know, what you do for an end user is different than, you know, a sophisticated agency or enterprise-level implementation of all of this. The take-home point is that WordPress is in a good spot; we all want it to be great. But more importantly, there are many ways to interpret all of this. Mike McAllister at Ollie is building his thing his way. And that’s not right or wrong. It’s right in his mind, and because I might have a different opinion, there needs to be that understanding within our space that there are several ways to accomplish the same thing, which is good and bad sometimes.
Because a lot of times people are like, well, show me the way. There are six different ways to get to the top. You know, and that’s frustrating for some people because they want one way. Do you have any closing remarks or comments about specific themes and what we discussed here? Or if you have any under-the-hood insights into 2025, which I think is supposed to ship with WordPress 6.7 and all of
Nick Diego: I think if you’re listening to this and you’ve never built a theme before, or you’re starting this for the first time, my recommendation, and you’ve heard a lot about child themes and maybe there are articles from the past around how you really should start with a child theme, I would recommend finding a solid base theme, whether you want to start with the base 2024 or the upcoming 2025 theme, I would recommend just starting with that theme, making the modifications to it, using the Crate Block theme plugin and don’t worry about child themes right now, especially if you’re starting. Take the theme, make your modifications in the site editor, and use the available tools like Create Block Theme to save those changes to the theme files and go with it.
Once you master that workflow and find that maybe I need a child theme, start exploring that. Still, it would help if you waited to dive into it first because many tools today allow you to build block themes quickly, save those changes, and build everything in the editor. The child theme is not the first place you need to go, especially if you’re starting. What do you think, Prime?
Brian Gardner: I agree with that 100%. I wasn’t going to plug this, but I’m going to now that we’re here. I recently released a Powder Zero theme onto the WordPress.org theme directory, a stripped-down version of my powder theme. I started getting scope creep inside of Powder, and we still need to get into the idea of color palettes, presets, variations, and all that stuff, which brings us to a fourth dimension of WordPress.
Using that as a base theme became hard because you needed help undoing many shipping things with that central theme. So I’m like, you know, in light of all the conversation that we had at Build Mode, let me provide a, what I think is a very, very stripped down and unopinionated theme to do the very thing you just said, which is cut your teeth, put it on a local, understand how it works, take it. There are no patterns. There are a couple of colors just because there should be.
Then, play with it, build something out, export it, and see what happens as you get more comfortable with that process. Whether through theme files or the Create Block Theme plugin, you can fork it and make it your own. The intent is for someone to take that and make that their base theme. Just play around. The problem is billable hours and all that kind of stuff. And so, like, it gets in the way of the mindset that you are investing into your future means understanding how this works because once you start to understand it Then, you start to see the ROI where you can begin to do things faster and more efficiently, and so on.
Nick, thank you again for taking some time out of your day. I know you love to help and educate, so this is another extension of what you get paid to do. Of course, I know you love talking about themes and all of that. I promise to avoid bothering you for another few days about what we should do and how to communicate all this.
Nick Diego: Yeah, well, thanks for having me again. My job is literally to speak to the community and talk to developers who are struggling with things. My colleagues and I are here to hear your frustrations and concerns. If you need help building block themes or with these things, we are in the community to help serve you. So please feel free to reach out; it’s not a bother to reach out to us.
Brian Gardner: Yep. A hundred percent, a hundred percent. Thanks again, Nick, for being here. I will see you next week at WordCamp Minneapolis, which I’m looking forward to. We’ll continue this conversation through various avenues, online and on social media, through events, etc. So, if you have any questions, hit us up. In the meantime, as a reminder, you’re listening to the Press This podcast, where I, Brian Gardner, WordPress Advocate on behalf of WP Engine, dive deep into the ever-changing world of WordPress and what it means for product people, business owners, and end users. Until next time, have a great day.
مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد
منبع: انجمن وردپرس