Skip to content

Latest commit

Β 

History

History
76 lines (65 loc) Β· 2.59 KB

File metadata and controls

76 lines (65 loc) Β· 2.59 KB

Wordpress Learning Note

Wordpress version: 4.9.6

Create theme

All themes for worpdress are located in wordpress\wp-content\themes\ directory. To create a new theme, at first, you should create a directory inside it, for example wordpress\wp-content\themes\minhgdd\.

Sample directory tree

.
β”œβ”€β”€β”€wp-admin
β”œβ”€β”€β”€wp-content
β”‚   β”œβ”€β”€β”€themes
β”‚   β”‚   β”œβ”€β”€β”€minhgdd
β”‚   β”‚   β”‚   β”œβ”€β”€β”€css
β”‚   β”‚   β”‚   β”œβ”€β”€β”€js
β”‚   β”‚   β”‚   └───template-parts
β”‚   β”‚   β”œβ”€β”€β”€twentyfifteen
β”‚   β”‚   β”‚   β”œβ”€β”€β”€css
β”‚   β”‚   β”‚   β”œβ”€β”€β”€genericons
β”‚   β”‚   β”‚   β”œβ”€β”€β”€inc
β”‚   β”‚   β”‚   └───js
β”‚   β”‚   β”œβ”€β”€β”€twentyseventeen
β”‚   β”‚   β”‚   β”œβ”€β”€β”€assets
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€β”€css
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€β”€images
β”‚   β”‚   β”‚   β”‚   └───js
β”‚   β”‚   β”‚   β”œβ”€β”€β”€inc
β”‚   β”‚   β”‚   └───template-parts
β”‚   β”‚   β”‚       β”œβ”€β”€β”€footer
β”‚   β”‚   β”‚       β”œβ”€β”€β”€header
β”‚   β”‚   β”‚       β”œβ”€β”€β”€navigation
β”‚   β”‚   β”‚       β”œβ”€β”€β”€page
β”‚   β”‚   β”‚       └───post
β”‚   β”‚   └───twentysixteen
β”‚   β”‚       β”œβ”€β”€β”€css
β”‚   β”‚       β”œβ”€β”€β”€genericons
β”‚   β”‚       β”œβ”€β”€β”€inc
β”‚   β”‚       β”œβ”€β”€β”€js
β”‚   β”‚       └───template-parts
β”‚   └───uploads
β”‚       └───2018
β”‚           └───06
└───wp-includes

Files explanation

File Description
style.css Required. This file is required for Wordpress to detect this directory a theme directory.
screenshot.png Optional. This image displays on admin-site as a sample screenshot.

style.css (required)

/*
Theme Name: MinhGDD First Theme
Theme URI: http://example.com/minhgdd
Author: MinhGDD
Author URI: http://example.com/minhgdd
Description: This is MinhGDD's first theme for learning
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: learning, minhgdd
Text Domain: minhgdd

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.

Source: https://codex.wordpress.org/Theme_Development#Theme_Stylesheet
*/