-1

enter image description here

New to wordpress & Working on a custom theme and this line of css seems to overwrite any of my header colors on my style.css. I'm using chrome and this seems to pop up inside of inspect element, but can't find the source on where exactly it's coming from. Any idea where (index):138 might be coming from? I did check index.php, header.php etc but can't seem to find any inline styles.

  • 1
    You copy the .site-title a,... line and search inside your project. Probably your custom theme style.css – prosti Jan 1 '17 at 10:04
  • @prosti thanks for the reply. Yea i'm using sublime and tried a search all and o results were found. it is something definitely inline that is being generated in, but not sure from where. From Firefox it is saying inline and chrome it's showing index but when i search it isn't there. – cesar gomez Jan 1 '17 at 10:09
  • It is one of your .css files. Try to search the first 50 characters of that line inside your themes. – prosti Jan 1 '17 at 10:10
  • @prosti still no luck after searching full folder with " .site-title a, h1, h2, h3, h4, h5, h6" – cesar gomez Jan 1 '17 at 10:13
  • Do you have a project? Consider not only your theme but the whole all project in your search and all types of files. Make sure you haven't selected some fancy options in your Sublime like Regular expressions. – prosti Jan 1 '17 at 10:14
0

I usually search from Sublime also, with these options included

enter image description here

Your should search inside your whole project, meaning all plugins and themes. You can set your project include also the WordPress installation.

I assume you work on your local end. That would be for the search.


Cesar: Not sure if only way of overwriting is with !important?

Re the child themes. Have you checked this document? https://codex.wordpress.org/Child_Themes

I meant this in particular:

If your child theme style.css contains actual CSS code (as it normally does), you will need to enqueue it as well. Setting 'parent-style' as a dependency will ensure that the child theme stylesheet loads after it. Including the child theme version number ensures that you can bust cache also for the child theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.