Search code examples
csswordpresswebindexingediting

Edit Index File in WP


I have an anomaly. So, I'm trying to edit\remove the background in the .site-header-main of my of a site. I edited via theme editor however, seems that such is not taking as the code is in the index file. Here is the website: https://retrocarsales.com/

Code in theme CSS after change via style.cc and\or theme editor:

    .site-header-main, .site-description, .site-title-text a {
    background: none;
}
    .site-header-main {
    border-bottom: none;
} 

Code in (Index):258 when inspecting:

    .site-header-main, .site-description, .site-title-text a {
    background: #444444!important;
    color: #ffffff!important;
}
    .site-header-main {
    border-bottom: 1px solid #444444!important;
}

NOTE: The code above is NOT found in Domain\WP-Content\Theme\index or in Domain\index I only find the related code in domain/wp-content/themes/theme-name/style.css in which there its good but its not executed on live site ... seems the site gets code from index not style.css

Thank You


Solution

  • You should never direct edit the theme's file if you are not a developer - this may be break your site or even make your site down if you make mistakes.

    Instead of that, you can safely add your custom CSS by go to Appearance > Customize > Additional CSS (remember to add "!important" to overwrite current CSS rules).

    See below image for more detail: enter image description here