admin管理员组文章数量:1291040
I'm using a customised version of a commercial theme, with a lot of stuff in it.
I've changed style.css to only have:
/*!
Theme Name: A quite unique theme name
Theme URI: /
Version: 1.0.0
Description: Unique description
*/
Wordpress still finds an 'update' for the theme using the original name of the theme from the vendor. Wordpress says the current version is 1.0.0, which matches the style.css header.
Where is it getting the name from in order to look up the update?
Thanks!
I'm using a customised version of a commercial theme, with a lot of stuff in it.
I've changed style.css to only have:
/*!
Theme Name: A quite unique theme name
Theme URI: http://www.mywebsite/
Version: 1.0.0
Description: Unique description
*/
Wordpress still finds an 'update' for the theme using the original name of the theme from the vendor. Wordpress says the current version is 1.0.0, which matches the style.css header.
Where is it getting the name from in order to look up the update?
Thanks!
Share Improve this question asked Jun 3, 2021 at 14:49 mozbozmozboz 2,6281 gold badge12 silver badges23 bronze badges 3- 1 Curious as to why you wouldn't create a child theme instead of modifying a commercial theme. The method you have chosen means you won't get any theme updates, including security updates and bug fixes. – vancoder Commented Jun 3, 2021 at 15:06
- @vancoder Yeah good point. The modifications I've made were not to the usual theme files but to some of the core working in some application logic. I am dumb and lazy, so have not checked if it's easily possible to override a PHP file with application logic in it from a child theme. – mozboz Commented Jun 3, 2021 at 15:16
- You can declare plugins to be private in 5.8 which should avoid this, maybe the same is true of themes? – Tom J Nowell ♦ Commented Jun 3, 2021 at 15:30
2 Answers
Reset to default 1It's the directory name.
If your theme is in wp-content/themes/my-theme
, then the theme name is my-theme
.
For anyone looking to change the theme name (which as per Jacob's answer is the directory name) and have Wordpress not know what you've done you can manually change settings as described here: https://docs.appthemes/tutorials/how-to-change-wordpress-themes-directly-from-the-database/
For me the 'template' option also needed to be the directory name, it did not work as the string of the name as in the style.css header, which is what this doc says.
Also the commercial theme I was using did do some slightly weird things but they were an easy fix, so I would not recommend doing this without thoroughly testing that a theme/plugin you're using doesn't have some stored hard-coded reference to the directory name somewhere!
本文标签: Where does Wordpress get the theme name from to check for updates
版权声明:本文标题:Where does Wordpress get the theme name from to check for updates? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741524060a2383361.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论