メインコンテンツまでスキップ

Creating Page

When you create a static page, please create page by WordPress admin page, and prepare page-{slug}.php template file.

Sub page template

LH WordPress Template has function to support nested page template like the following.

http://example.com/parent/child/
-> page-parent__child.php

so, if you need to create sub pages, please follow the above template file name.

警告

In case of the above url, page-child.php is also valid. but, please use the file name that is included parent slug name e.g. page-parent__child.php, because easier to find the page template from the url structure, and if you need to use same slug name to different parent, it's able to separate template file.

CSS Methodologies

Even wordpress template, please follow CSS Methodologies. so, page template and scss file relation is like the below.

http://example.com/foo/
-> page-foo.php
-> data/scss/object/project/_foo.scss
-> `.p-foo` class
http://example.com/parent/child/
-> page-parent__child.php
-> data/scss/object/project/_parent-child.scss
-> `.p-parent-child` class
補足

Please check CSS Methodologies Project file naming rules also.