문제

Is there a strict naming convention for creating child themes in wordpress.

I've learnt that child themes are usually named by appending the world child to them i.e. twentyfourteen-child. But could you name them by appending a different word to child i.e. twentyfourteen-clientname?

IF you name without appending the word child, will the child theme still get the parent theme's updates?

도움이 되었습니까?

해결책 2

As far as I am aware, you can name child themes as anything you want to.

e.g. parent theme: twenty-thirteen, child theme: carrot-cake

The main thing is to refer to the parent in your child theme style.css (https://codex.wordpress.org/Child_Themes) under the 'Template' name.

Many also then require you to import the CSS, as per the example shown in the Codex, but for others just the 'Template' reference is sufficient (e.g. Responsive theme)

다른 팁

You can name it pretty anything you like.

However, in the header of your child's style.css, you should specify the parent's directory using the Template tag. Here the parent theme is in a folder called twentyfourteen.

/*
 Theme Name:   Twenty Fourteen Child
 Theme URI:    http://example.com/twenty-fourteen-child/
 Description:  Twenty Fourteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyfourteen <--- THIS
 Version:      1.0.0
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fourteen-child
*/
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top