Wordpress Custom CSS
- Started
- Last post
- 6 Responses
- mg33
For those of you that manage and build WP sites, do you typically add all your custom CSS overrides to the custom field available in a theme, or do you go and overwrite the theme's main CSS document? Or, do you add an actual custom.css file and link it in the header file?
In all my themes, I add custom css in the text field in Appearance, but I've thought about shifting to the main CSS or the a linked file. I've found that on my new site, I'm using !important far more than before for custom CSS. I'd rather just consolidate everything into the main file.
- BabySnakes0
My preference is to edit the theme's CSS file. I hate having to override classes again in a new file. It may be a bit risky, but I feel my CSS skills allow me to do it.
- I want to do this before the launch, just to simplify things.mg33
- ideaist0
I have undiagnosed OCD (like many of you) and thus, must style things fom scratch.
http://starkers.viewportindustri…
Something like starkers allows a "naked" build for both form & function.
; )
- mg330
BabySnakes - the other thing is, the theme I'm using has been updated by GraphPaperPress, and as you know a theme update overrwrites any customizations. I've unfortunately made several... I'm going to have to review all the files I updated (header, footer, maybe some other ones) to make sure I grab them if the theme gets updated.
- ya.. i have been lucky in never having to update the theme for WP site I have made. Good luck.BabySnakes
- ukit20
I guess it depends what your intent is. If you are making modifications to an existing theme, but still want to preserve the original styles, adding your own CSS file or creating a child theme of the original would be the way to go.
On the other hand if you don't care about preserving the original code, just update the main style.css file.
- ukit20
Child theme is a good approach if you are building on top of a commercial theme that will be updated at a later time.
- mantrakid0
I tend to go with overwriting the themes files directly, then modifying the theme css file so the theme is version 99.0, thereby disabling the client from automatically updating the theme. :)
Child themes are a much more professional choice, though, and have been trying to go that route more recently.
- to be fair, i usually render the original theme unrecognizable, so i just rename it to their own branding / company name.mantrakid