wp-content » themes » style.css » How to Add Custom CSS Code to WordPress

How to Add Custom CSS Code to WordPress

Although you can change almost every aspect of WordPress themes, to design your site exactly how you want it, you may occasionally need to add some custom CSS.

In WordPress 4.7, a new way to add CSS to your site was added inside the Customizer which you can find in Customize > Additional CSS.

However, CSS added in this area is theme-specific, so if you switch themes, you’ll lose your CSS.

That is why I recommend using either a plugin to add custom CSS or a Child Theme.


Add Custom CSS code to WordPress using a plugin

The easiest way is to install Simple CSS

With the help of this plugin, you can insert CSS into a user-friendly editor in your Dashboard without having to directly edit any files or perform any other complicated tasks.

The CSS meta box that is included on each page is another benefit of this plugin. This gives you the option to apply CSS that just applies to that particular page, which can be quite helpful.

See also  Remove file version strings from CSS and JS links

Add Custom CSS code to WordPress using a Child Theme

Of course, if you’re already using a child theme, you can use the style.css file. Here is a quick tutorial on how to create a WordPress Child Theme:

How to Create a WordPress Child Theme 1024x431 - How to Add Custom CSS Code to WordPress

Was this post helpful?

Leave a Comment

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.

Recommended