简体   繁体   中英

How do I delete styles generated by a parent theme?

I create a website on Wordpress using a child theme. This is a child of the twentent theme. Sorry, but the site inherits the styles that I found in the . I found this using the browser development tools. These styles add a pink background to all .svg icons, eg the search icon. Or it changes the color of the headings. I would like to remove this effect, but I don't know how. Can anyone help me with this?

In another thread I read that these can be styles generated by the theme customizer. Is there a way to turn this off in a child theme?

Below I attach the link to the screenshot. Turning off this style sheet in the browser I get the effect I wanted, ie all headers and icons have the color that I defined in my style.css

在此处输入图片说明

Either you should check if the colors can be changed in the Customizer (which shouldn't be that hard).

Or try to override the styles of the parent theme in the child's style.css

You can do this by copying the lines used in the parent theme and then changing the settings inside the { } and adding that to the child style.css. Because your child theme style.css (should be) is included after the parent theme style.css, this should automatically override the parent theme style.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM