admin管理员组文章数量:1304188
I am creating a theme where I will display some pages
The issue I have is that the WordPress editor is adding a lot of class, for example has-text-align-center
The only solution I found is adding <?php wp_head();?>
into the head of my header
But this is adding too many things, I only want the classes created by the editor.
For example wp_head
is adding margin-top: 32px !important;
on the html
tag. I do not want that.
I am creating a theme where I will display some pages
The issue I have is that the WordPress editor is adding a lot of class, for example has-text-align-center
The only solution I found is adding <?php wp_head();?>
into the head of my header
But this is adding too many things, I only want the classes created by the editor.
For example wp_head
is adding margin-top: 32px !important;
on the html
tag. I do not want that.
1 Answer
Reset to default 1wp_head()
is absolutely required for WordPress themes. It is how your theme should be adding styles, and it's how plugins can add their own scripts styles. Without it (and wp_footer()
, which is also required) your theme will not function correctly.
WordPress does not load many styles itself, but the styles it does add are for markup created by the editor. The margin added to the HTML tag is to support the admin bar. Apart from the admin bar, emoji support, and the handful of editor styles, WordPress does not apply any additional styles to your theme.
本文标签: cssAdd core style in theme
版权声明:本文标题:css - Add core style in theme 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741752402a2395911.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论