Creating Theme File Header
First of all you need to have a theme folder. For that navigate to
wp-content > themes directory. Lets create your theme directory and lets name this
nerodev. Create a file called
index.php. This is your theme main file. As well create
style.css file. This file contains styles for your theme.
Lets open up
style.css file and insert following code and save the file.
/* * Theme Name: Nero Dev */
Now you have created your theme. Lets activate our theme. Navigate to
Appearance > Themes. There it is showing our theme. Click and activate it. You can browse this newly created theme. Are you wondering with a blank page. If you view the page source nothing showing. But this theme has been activated and it is working fine without any error. Why it is showing blank, because we haven’t write any code.
If you have refer to the Codex Theme Header, you will notice that there are many header information except Theme Name. Will define more header information.
/* * Theme Name: Nero Dev * Theme URI: https://nerodev.com/ * Description: A simple WordPress theme. * Version: 1.0 * Author: Team nerodev * Author URI: https://nerodev.com/ */
Theme URI – Theme URI refers to where find more about the theme
Description – Description regarding the theme
Version – Current version of the theme. Normally theme version starting from the 1.0
Author – The creator or the author of the theme. This could be a single person or group of people
Author URI – Reference to the creator of the theme
Except these there are many header information. You can use any header information other than these and it is absolutely fine.
If your Theme URI and Author URI are different no matter use it. It is no need to match each other. Here for demonstrations only I have used the same for both. Now you have a detailed Theme Header information. You can see it while checking the theme. Just refresh current activated theme and you’ll see what we have updated. It is now showing up Theme URI, Description, Version, Author and Author URI.
We are done with the Theme Header.