Hello, my name is Christy Rae, and in these lessons, we're going to talk about advanced theme development. Specifically, I'm going to show you how to create a block theme from scratch. Block themes are very different from classic themes in that everything is controlled with blocks. There's very little PHP code added to the theme and everything is controlled with HTML and using blocks in place of the PHP functions that were used in classic themes. Let's take a look at the files that are in a block theme. Some of them are required, some of them are not. We can see here I've got a very basic bare -bones block theme created called Chocolate World, and it's got several files in it. Some of these are required, some of them are not. Technically, the only two files that are really required for a block theme are style .css, and then inside of the templates folder, you need the index .html. Nothing else is absolutely required. But some of these other files that are here are very nice to have, they're very good to have, and we'll take a look inside of some of them. Another file that's good to have is the index .php file. You can see right now this just says nothing to see here. This is actually required for themes that support older versions of WordPress. It's good to have it in there just in case. If your users are using older versions of WordPress, which they shouldn't be, they should be using the latest version of WordPress, but just in case they are, they can still use the theme. Another file that's nice to have is the readme .txt file. This is just going to give some information about the theme, installation, and other things like that. Screenshot .png is another nice to have file, and you can see here what that does, it just puts the screenshot, or in this case, it just says Chocolate World, and that lets the user see something in the theme screen in WordPress. So it's good to have something there, and it's just a, in this case, it is a 1200 by 900 image, and it's just got whatever, if you wanted to put a screenshot in there, you can. So after you've built the theme out, you can take a screenshot of the page, of maybe the homepage or something like that with the theme already set up, or you can put a picture like I did there. Another file that's good to have is the themed .json file, and you are going to use that to set up styles, options, and other things in the theme. As I mentioned, the index .html file inside of the templates folder is required, but you can have additional template files, and then you can also create a parts folder, and that will contain additional template parts like the header, the footer, the query, and any other template parts that you want. One more file that's good to have, but again, not necessary, is the functions .php file. And I do have a little bit of code in mind, it doesn't actually do anything, but this would be where if you wanted to register support for any features that aren't automatically supported by block themes, you would put them into the functions .php file. Now let's take a closer look at some of these files. So I'm going to actually look at the styles .css file. This is a very important file. This is going to let WordPress know about your theme. So it's going to have things like the name of the theme, the author, the description, what version it is, what versions of PHP and WordPress are required, and other things like that. And you can see mine is empty right now, which means if I go into WordPress and I look at the theme details, it just says that the theme name is Chocolate World, it doesn't have a version, and it's by Anonymous. And that's just because I haven't set anything up in the So let's take a look at that The information that goes into that theme description or the theme details are going to be in a CSS comment. So that's all that you're going to add to the style .css file. It may seem a little weird that you're not actually adding your sheet, but we're just going to be adding information about the theme to this file. So you're going to add a comment in there, and all of the content we're going to put in here is going to go inside of this opening and closing comment tag. So first thing we add in here is going to be the theme name. So you just type out theme name, and you don't need that semicolon, it's auto -correcting there. And then you're just going to type in the name of the theme. Next thing that you can do, not required, but you can put the URI of the theme. So if you have a URL where you want users to go to get more information about the theme, you can type that in there. So I'll just type in my website. And next up, you can type in the name of the author and the URI of the author. And again, you type in the URI. There we go. And then the other thing you can do is add a description. But before I do that, I do want to save my work. So I'm just going to save my file and I'm going to refresh the screen so we can see that this put in the chocolate world theme, which is what I added. And it's got by Christy Ray and it's going to mywebsite .com. So let me go back into there. So next thing I'll do is add a description. And these words that I'm using are the actual words that you would want to use. So you would type in description exactly as I've got it written here, description colon, and then the actual description. WordPress can then read that and it knows what to put into the backend. So I'm going to say, then we can also add a version. So this is 1 .0. So we're just going to put that in there and you can modify the version. So it's a good idea to kind of keep track of those versions. So as you make changes to your theme, you can update the version number. And then the next thing we're going to do is we're going to say what version of, what's the minimum version of WordPress that's required for this theme. So you can type in requires at least. So what version is the minimum that you're going to allow users or that you want users to use this theme. And we're going to say 5 .9 for this one. And we're going to say what version it was tested up to. And we're going to just type in tested up to. And we're going to say that was the current version of WordPress as of the recording of this video, which is 6 .2. You can also specify what version of PHP is required. So we're going to type in requires PHP and we'll say that this requires 7 .4, or you could say 8 .0, whatever version of PHP you want to require. So it just depends on what you've put into the code for the theme. So we're going to say 7 .4 for this one. And then you can also put in what the license is and the URI of the license. I'm not going to add that right now. I don't want to type it all out. And that's pretty much all that's required. Some other things that you can add in there would be things like the tags. So if you add in tags, these are the tags that would show up if you submitted this to the theme repository, these are the tags that would be filtered on. So you could do things like full site editing. So I'm just going to save that. And once again, I'll go back into this backend here, take a look, let me refresh it. And now you can see it's got the tags listed there. It's got the description and the version is listed there as well. So I'm done editing my style . css file. And let's just take a quick look also at the readme .txt file. Right now it's empty. So if I open this up in my text editor, it's empty, but you could put things in here. The readme .txt file is required if you plan to distribute the file. So it's technically not required just to make the theme. The WordPress doesn't require you to have it there, but it's good to have, because if you're going to distribute it, you need to let users know information about installation, modifying things. And so you would add stuff like, so similar stuff to what's in the style .css, but you can also add things like description and you can also add things like installation. So you can add all of that information there. So this is pretty basic file. You can modify it as needed for whatever you're going to do with this theme. So thanks for watching and stay tuned for the next lesson, where we will take a look at creating and editing the template files for your block theme.