return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>Understanding the childparent theme relationship
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Understanding the childparent theme relationship

programmeradmin2浏览0评论

I am looking to edit the header.php file on my website. My parent theme has a header.php file. I copied that file to my child theme and added the necessary code. It seems to be working.

My question is. If the theme developers update the theme, and specifically the header.php file, wouldn't my website ignore their updates since the header.php file is being read from my child theme? Or does it combine the files?

I am looking to edit the header.php file on my website. My parent theme has a header.php file. I copied that file to my child theme and added the necessary code. It seems to be working.

My question is. If the theme developers update the theme, and specifically the header.php file, wouldn't my website ignore their updates since the header.php file is being read from my child theme? Or does it combine the files?

Share Improve this question asked May 7, 2020 at 4:16 VonedaddyVonedaddy 1
Add a comment  | 

1 Answer 1

Reset to default 0

If you replace a template file using your child theme, then yes, your website will ignore those changes, because the child theme's version will be loaded. There's no way to merge the files. If you want those changes you will need to copy them into your child theme.

This fact has some important implications. If the parent theme changes dramatically enough, then the version of the template in your child theme could no longer be compatible with the parent theme. There's nothing stopping theme authors from making incompatible updates to their parent theme, apart from best practice. However, this shouldn't be too common. If a parent theme is 'child theme friendly' then the developer should avoid these types of updates.

发布评论

评论列表(0)

  1. 暂无评论