Where to add CSS in WordPress?

So you’ve been given a code snippet and told to add it to your WordPress theme…. but exactly where should you add it?

If you’re using a custom theme built for you by a web designer then you should add custom CSS to your theme’s main style.css found via Appearance > Theme Editor.

If you’re using a premium theme:

  1. First check if there is Child Theme in use. If yes, add your CSS there.
  2. If there’s no Child Theme, look for a custom CSS section provided by your theme. It would usually be in Appearance > Theme Options. If your theme includes this functionality, add your CSS there.
  3. If neither of those options exist then I recommend you install “Simple Custom CSS” plugin (pictured below), and add your custom CSS there.

Simple Custom CSS Plugin Screenshot

Why not add CSS directly to my premium theme?

Tempting I know… but you don’t want to do that because any code you add will be overwritten if/when the theme updates.

Why not add CSS directly to the plugin I’m trying to modify?

Again, tempting… but you don’t want to do that because any code you add to a plugin will be overwritten if/when that plugin updates.

New styles not showing?

If you have trouble with your new CSS mods not showing up (and have checked you are actually targeting the correct selector) you can use !important declaration to override other styles.

So there you have it – a quick and easy answer to the common question of where to add css in WordPress.

Leave a Comment

Your email address will not be published. Required fields are marked *