admin管理员组文章数量:1022594
I want to know if I add some short code in functions.php in my theme and solve my problem, What will happen if I update my Theme ?? is my short code delete after update ?? will i have any problem with updating my theme after adding the code to functions.php ?
I want to know if I add some short code in functions.php in my theme and solve my problem, What will happen if I update my Theme ?? is my short code delete after update ?? will i have any problem with updating my theme after adding the code to functions.php ?
Share Improve this question asked May 1, 2019 at 20:57 Pasargad PasargadPasargad Pasargad 1 1- 1 You should provide some more concrete examples of what you're dealing with and what your question is. – phatskat Commented May 2, 2019 at 3:10
1 Answer
Reset to default 2Yes.
It's best practice to use a child theme and make your modifications there rather than edit the parent theme directly. This will allow you to to make changes without fear of overwriting your customizations.
From the Codex:
A child theme inherits the look and feel of the parent theme and all of its functions, but can be used to make modifications to any part of the theme. In this way, customizations are kept separate from the parent theme’s files. Using a child theme lets you upgrade the parent theme without affecting the customizations you’ve made to your site.
I want to know if I add some short code in functions.php in my theme and solve my problem, What will happen if I update my Theme ?? is my short code delete after update ?? will i have any problem with updating my theme after adding the code to functions.php ?
I want to know if I add some short code in functions.php in my theme and solve my problem, What will happen if I update my Theme ?? is my short code delete after update ?? will i have any problem with updating my theme after adding the code to functions.php ?
Share Improve this question asked May 1, 2019 at 20:57 Pasargad PasargadPasargad Pasargad 1 1- 1 You should provide some more concrete examples of what you're dealing with and what your question is. – phatskat Commented May 2, 2019 at 3:10
1 Answer
Reset to default 2Yes.
It's best practice to use a child theme and make your modifications there rather than edit the parent theme directly. This will allow you to to make changes without fear of overwriting your customizations.
From the Codex:
A child theme inherits the look and feel of the parent theme and all of its functions, but can be used to make modifications to any part of the theme. In this way, customizations are kept separate from the parent theme’s files. Using a child theme lets you upgrade the parent theme without affecting the customizations you’ve made to your site.
本文标签: Add code to Functionsphp
版权声明:本文标题:Add code to Functions.php 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745533628a2154861.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论