开发者

Wordpress Thematic child theme: editing template files

开发者 https://www.devze.com 2023-01-23 03:37 出处:网络
I built a Wordpress child theme based on Thematic framework and edited some template files. When I upgraded to a new version of Thematic all changes to my template files were lost.

I built a Wordpress child theme based on Thematic framework and edited some template files. When I upgraded to a new version of Thematic all changes to my template files were lost.

I guess it makes sense but that makes me a little disappointed in the child theme concept...

So if I understand correctly, there's no way to edit template files of Thematic (or any other WP theme framework?) and then upgrade easily and keep the changes? The way to modify a Thematic child theme is with styles and hooks, but changing开发者_StackOverflow template files is a no-no because all changes will be lost with upgrade?


By child theme, i'm assuming you just made some changes to that Thematic theme but for a specific blog, in which case, yes, your changes would of been over written on upgrade.

To avoid this, create a new theme folder on your sever and copy all the files over to that new theme. Once the files are copied, go into your stylesheet, and modify the comments in the header of the file. This is where you can rename your theme to say something like Thematic Theme Customized or you can rename it to whatever you want.

Once these two steps are complete, you should be good to make any modifications without fear of your data being erased on site upgrade.

Please note, that by going this route, WordPress doesn't know there's a new theme that it needs to upgrade, so if the Thematic theme has a system upgrade it needs to update, you'll need to copy that update over to your newly modified theme.

Hope this helps


Make sure you copy the childtheme out the thematic theme dir into the theme dir and edit the childtheme functions.php. Otherwise if you upgrade the theme changes will be lost.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号