admin管理员组文章数量:1130349
I successfully created a copy of a theme in WordPress and now have a child version. I was hoping to be able to modify it further but from this point I do not understand what options are now given to me that were not given to me before.
For example, if I want to change the mobile-only menu from being located on the left in "House painter" to be centered, how would I go about and do that?
I am still a bit confused by CSS, script and so on. I was hoping to remove the current structure of the footer (currently divided in 5 equal parts) into a more simple structure but adding a png that would overlap the original content slightly. So was hoping to put a png in the center top -50 px for example.
Anyone could give me a helping hand?
I successfully created a copy of a theme in WordPress and now have a child version. I was hoping to be able to modify it further but from this point I do not understand what options are now given to me that were not given to me before.
For example, if I want to change the mobile-only menu from being located on the left in "House painter" to be centered, how would I go about and do that?
I am still a bit confused by CSS, script and so on. I was hoping to remove the current structure of the footer (currently divided in 5 equal parts) into a more simple structure but adding a png that would overlap the original content slightly. So was hoping to put a png in the center top -50 px for example.
Anyone could give me a helping hand?
Share Improve this question edited Jan 8, 2019 at 15:54 Howdy_McGee♦ 20.9k24 gold badges91 silver badges177 bronze badges asked Jan 8, 2019 at 15:46 Carl Göran HeintzCarl Göran Heintz 11 bronze badge2 Answers
Reset to default 1This is a pretty good resource with a lot of details about Child Themes. I would suggest reading the entire thing.
You can override any file in your child theme by copying the parent theme's file and placing it in the same directory of your child theme.
For example, to make edits to your footer.php, the file you would most likely need to edit to remove some of the 5 columns you mentioned, you would copy the parent theme's footer.php and place it in the root of your child theme. Then you can freely make changes to this file.
I would suggest doing the above and playing around with the layout to try to achieve what you want. Then if you have more specific questions you can start a new question and get more specific answers.
The purpose of a Child Theme is so you can make changes to a theme without your changes being overwritten whenever the theme updates. With that in mind, now that you have a child theme you can copy over files from the parent theme and use them in the child theme.
For example, if your mobile menu is located in the parent themes header.php file - you can copy that file to your child theme and make any changes you see fit. WordPress will see that the child theme has a header.php and will use that file instead of the parent themes header.php file. The same can be done with the footer. Depending on the theme you may also be able to do this with functions and hooks.
In the future your parent theme may update but your child theme won't receive any automatic updates and your changes will be preserved. You can read more about Child Themes in the WordPress Handbook - Child Themes, specifically regarding template overriding.
If you're not sure how to fix something with CSS that kind of question may be better suited at Stack Overflow.
I successfully created a copy of a theme in WordPress and now have a child version. I was hoping to be able to modify it further but from this point I do not understand what options are now given to me that were not given to me before.
For example, if I want to change the mobile-only menu from being located on the left in "House painter" to be centered, how would I go about and do that?
I am still a bit confused by CSS, script and so on. I was hoping to remove the current structure of the footer (currently divided in 5 equal parts) into a more simple structure but adding a png that would overlap the original content slightly. So was hoping to put a png in the center top -50 px for example.
Anyone could give me a helping hand?
I successfully created a copy of a theme in WordPress and now have a child version. I was hoping to be able to modify it further but from this point I do not understand what options are now given to me that were not given to me before.
For example, if I want to change the mobile-only menu from being located on the left in "House painter" to be centered, how would I go about and do that?
I am still a bit confused by CSS, script and so on. I was hoping to remove the current structure of the footer (currently divided in 5 equal parts) into a more simple structure but adding a png that would overlap the original content slightly. So was hoping to put a png in the center top -50 px for example.
Anyone could give me a helping hand?
Share Improve this question edited Jan 8, 2019 at 15:54 Howdy_McGee♦ 20.9k24 gold badges91 silver badges177 bronze badges asked Jan 8, 2019 at 15:46 Carl Göran HeintzCarl Göran Heintz 11 bronze badge2 Answers
Reset to default 1This is a pretty good resource with a lot of details about Child Themes. I would suggest reading the entire thing.
You can override any file in your child theme by copying the parent theme's file and placing it in the same directory of your child theme.
For example, to make edits to your footer.php, the file you would most likely need to edit to remove some of the 5 columns you mentioned, you would copy the parent theme's footer.php and place it in the root of your child theme. Then you can freely make changes to this file.
I would suggest doing the above and playing around with the layout to try to achieve what you want. Then if you have more specific questions you can start a new question and get more specific answers.
The purpose of a Child Theme is so you can make changes to a theme without your changes being overwritten whenever the theme updates. With that in mind, now that you have a child theme you can copy over files from the parent theme and use them in the child theme.
For example, if your mobile menu is located in the parent themes header.php file - you can copy that file to your child theme and make any changes you see fit. WordPress will see that the child theme has a header.php and will use that file instead of the parent themes header.php file. The same can be done with the footer. Depending on the theme you may also be able to do this with functions and hooks.
In the future your parent theme may update but your child theme won't receive any automatic updates and your changes will be preserved. You can read more about Child Themes in the WordPress Handbook - Child Themes, specifically regarding template overriding.
If you're not sure how to fix something with CSS that kind of question may be better suited at Stack Overflow.
本文标签: Modifying a child theme
版权声明:本文标题:Modifying a child theme 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749032690a2305926.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论