How to Add the ‘Theme Details’ to Your WordPress Theme

WordPress Theme - Viewing the Theme Details
WordPress Theme – Viewing the Theme Details (WordPress: Dashboard\Appearance\Themes)

If you have created your own WordPress theme and want to add a name, version number, etc to identify your theme, then all you need to do is is add a small bit of code to the top of your style.css file.

/*
Theme Name: Treesme
Author: Treesme
Author URI: treesme.com
Description: This theme is for my sites…
Version: 1.0
*/

Example code (minified style.css version):

WordPress Theme - Adding the Theme Details to the Style css (minified version)
WordPress Theme – Adding the basic Theme Details to the Style css (minified version)

Notes:

  • If you use a compiler to create your style.css file, the ‘Theme Details’ will get erased each time you compile your styles.css file. You will have to re-enter the ‘Theme Details’ code at the top of your style.css file when you have finished compiling.

Save the updated style.css file and compare the difference:

Before:

WordPress Theme - Adding the Theme Details
WordPress Theme – Adding the Theme Details (Before)

After:

WordPress Theme - Displaying the Theme Details
WordPress Theme – Adding the Theme Details (After)