admin管理员组文章数量:1418306
I am trying to move my site to WP using a child theme based on twenty sixteen (this is the first time I am dealing with WP).
Considering my site html and css, is it possible to incorporate html structure and css from my site into child theme and get rid of all ids and selectors which are not used? If so, what would be the first step in this process? Say should I start with tweaking header.php and footer.php considering my markup etc.? What I am trying to achieve is to move all pages of my site to WP and also add a blog page.
I've read quite a few similar topics on this site including how to tweak wp_nav_menu, Codex article on how to create and modify a child theme, Walker class etc. I also read this article How To Create And Customize A WordPress Child Theme however, was unable to get a clear understanding if what I am trying to achieve (please refer to my question above) is possible. I did however gain some general understanding in terms of what is a child theme, how templates work, what is template tags etc.
I am trying to move my site to WP using a child theme based on twenty sixteen (this is the first time I am dealing with WP).
Considering my site html and css, is it possible to incorporate html structure and css from my site into child theme and get rid of all ids and selectors which are not used? If so, what would be the first step in this process? Say should I start with tweaking header.php and footer.php considering my markup etc.? What I am trying to achieve is to move all pages of my site to WP and also add a blog page.
I've read quite a few similar topics on this site including how to tweak wp_nav_menu, Codex article on how to create and modify a child theme, Walker class etc. I also read this article How To Create And Customize A WordPress Child Theme however, was unable to get a clear understanding if what I am trying to achieve (please refer to my question above) is possible. I did however gain some general understanding in terms of what is a child theme, how templates work, what is template tags etc.
Share Improve this question asked Jul 30, 2019 at 3:47 810311810311 517 bronze badges1 Answer
Reset to default 0Yes, you can technically use your own HTML structure and get rid of all the IDs and selectors you don't like. However, this is not how you build child themes. Child themes are meant to keep most of the underlying HTML structure of a theme - you can tweak it in some places, but if you're completely overriding the parent theme, there's no benefit at all in making a child theme and you should instead build a custom from-scratch theme.
You may wish to look for themes built specifically for extension, such as Underscores, where they include minimal markup and are basically blank canvases for you to style and tweak. Usually, you actually copy the code into a new custom theme rather than child-theming with this approach.
However, depending on your needs and coding expertise, you may realize more benefits from finding a parent theme that meets most of your needs and tweaking it in a child theme. "IDs and selectors you don't like" typically don't carry much bloat/weight in the scheme of things and it's usually fairly easy to style as desired. It's often more important to ensure the theme you select meets your needs as far as functionality and semantics - for example, does the theme use semantic HTML5 that will be accessible to all your users? Some extra IDs and classes are trivial compared to making sure the tags themselves are what you need for your purposes.
本文标签: change html and css in template files in child theme
版权声明:本文标题:change html and css in template files in child theme 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745283164a2651545.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论