简体   繁体   English

WordPress 主题开发 ||| 目录主题名称

[英]WordPress theme development ||| Directory theme name

I have created my own theme from scratch.我从头开始创建了自己的主题。 I am therefore in the process of testing the theme through the plugin Theme Check .因此,我正在通过插件Theme Check测试主题。

"WARNING: Your theme appears to be in the wrong directory for the theme name. The directory name must match the slug of the theme. This theme's correct slug and text-domain is twentyeleven.” “警告:您的主题似乎在主题名称的错误目录中。目录名称必须与主题的 slug 匹配。此主题的正确 slug 和文本域为 21。”

The name is just an example.这个名字只是一个例子。

I can't change the name of the folder, without the theme losing a lot of elements on the page.我无法更改文件夹的名称,主题不会丢失页面上的许多元素。 I reinstall the theme each time.我每次都重新安装主题。 It also does not work when I change the name in style.css.当我在 style.css 中更改名称时,它也不起作用。

Do you have any suggestions?你有什么建议吗?

Submit your template on http://themecheck.org they will give you proper slug text-domain for your theme name. http://themecheck.org上提交您的模板,它们将为您的主题名称提供适当的Slug文本域。 Kindly check Text Domain: in style.css also. 请在style.css中也检查Text Domain:。

Now on 5.09.2019 I have faced the same problem.现在在5.09.2019我遇到了同样的问题。 In my case making the text-domain and the theme folder name 100% the same & remember that it is case sensitive.在我的情况下,使文本域和主题文件夹名称 100% 相同并记住它区分大小写。

Example: wp-content/themes/khaowadaowa示例: wp-content/themes/khaowadaowa

Then your text-domain must be * Text Domain: khaowadaowa那么你的文本域必须是* Text Domain: khaowadaowa

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM