Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The first step in creating a new theme is giving the theme a name and setting up the theme information. If you go to your WordPress site right now, and you navigate to the back end to themes, you'll see here we have our currently active theme, called my-simone, but if you click on theme details, you see there's not really much information here. We have a generic blank thumbnail, and the name of the theme is all lower case my-simone. The version is 1.0 and it's made by Underscores.me. There's also no description for the theme itself.
What we need to do here, before we do anything else, is provide a proper name and a proper description for our theme, so when people download the theme or access it in some other way, they'll actually know what it is. And all that information is stored in style.css. So I'm going to go to my IDE and open style.css. And here you see right at the top we have a large commented-out section that has all these variables, theme name, theme URI and so on. And this is the information WordPress uses to identify this as a theme.
Now, if you're an experienced web designer or developer, and you're familiar with how code works, it might seem a little strange that the definition of the theme is contained within the style.css file. But this is how WordPress works. And it's actually kind of clever because it contains all the pertinent information about the theme in one place. So here we need to change this information to match us. So here I'm going to change name to my-simone. I can set a theme URI if I want to, so this would be a link to where the theme is available once it's public.
So currently I don't have one, so I'm just going to put lynda.com here. Then I can set my name as the author. And I can set an author URI, so this link will wrap around my name. So here, I'll put a URI to my courses, and then I get the description. And here you can be as exhaustive as you want in describing your theme, and it's a good idea to do so, especially if your theme has a lot of cool features, so when people look at the theme they'll know what they'll be able to activate. Now I'm just going to put in a basic description now, and you can be as descriptive as you want.
Next we have to set a version number, and I like to start at 0.1 and only set the version to 1.0 when I'm absolutely ready. And then we have to set a license. Now anything published that works with WordPress needs to inherit the General Public License, or GPL, which is listed here. But you can add additional licenses if you want to. And those additional licenses would go onto this license URI link here. So if you want to add additional information, maybe about font licenses or something else, you would make a new file called license.txt and add all the information in there.
So you can choose whether you want to do that or not, but no matter what you do, this theme, like WordPress, is licensed under GPL. This is not an option. That's just how it is. The two next options, Text Domain and Domain Path, have to do with translation services, and they're not going to be covered in this course. But basically, when you create a text string within your theme, you can choose to wrap it in code so that another person can translate the theme into a different language. And these two fields: Text Domain and Domain Path, tell WordPress how to translate that content.
Now all the text that we're going to put into the theme in this course will actually be translation-ready, but I'm not going to go into great detail about exactly how it works. So just rest assured that as long as we use my-simone as the text domain, and the domain path is languages, everything will be fine. The last option here is tags. Now these are tags that link up to the WordPress theme directory. And here you can't just put in anything. There's actually a restricted number of different tags we can use. To see what those tags are, you have to go to wordpress.org/themes/tag-filter and here you see the available themes, and there's a limited list of these tags.
You can see things that apply to our theme are two columns, right sidebar, responsive layout, and then some colors. So I can put those in. And then I can put in some colors, white, blue, black, and so on. Now that I've added all the information I want, I can save my file, and if I now go back to my themes here, reload the page, you'll see my theme is now called My Simone without the dash. When I go to theme details, we have more information.
There you see the full name with a version number. Here's a link to me. There's the description and here are the tags. So now we have basic information about the theme, and as you build it out you may want to go back and change this information to keep it current.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.