最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Creating a child theme: How do I find the template name of the parent directory?

programmeradmin1浏览0评论

I am trying to create a child theme for the Fitness Hub theme. I'm following this guide (/), when it comes to part 2. it makes it clear I need to add a 'Template' header in the style.css (of the child theme), however there isn't a template name in the parent theme's style.css. So it's not clear to me what this template name should be. I used 'Template: fitnesshub', but this doesn't work, the child theme does not generate. I get the following error in my themes directory (on the browser):

The parent theme is missing. Please install the "fitnesshub" parent theme.

When I install the parent theme (clicking the link) the same issue occurs.

TIA.

I am trying to create a child theme for the Fitness Hub theme. I'm following this guide (https://developer.wordpress/themes/advanced-topics/child-themes/), when it comes to part 2. it makes it clear I need to add a 'Template' header in the style.css (of the child theme), however there isn't a template name in the parent theme's style.css. So it's not clear to me what this template name should be. I used 'Template: fitnesshub', but this doesn't work, the child theme does not generate. I get the following error in my themes directory (on the browser):

The parent theme is missing. Please install the "fitnesshub" parent theme.

When I install the parent theme (clicking the link) the same issue occurs.

TIA.

Share Improve this question edited Mar 16, 2021 at 9:42 dwright asked Aug 19, 2019 at 19:54 dwrightdwright 1034 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

As stated in the Theme handbook (https://developer.wordpress/themes/advanced-topics/child-themes/)

you need to use the parent theme dir name in the 'Template' header. In your case the template name would be.

Template: fitness-hub

发布评论

评论列表(0)

  1. 暂无评论