Those that know CSS know that CSS categories are a large timesaver when styling a complete website. However in the event you don’t code, you might have by no means discovered how robust they may be able to be. Nowadays, we modify that.
On this put up, I’ll display you 3 simple techniques so as to add CSS categories to WordPress—even though you’ve by no means written a unmarried line of code. You’ll additionally discover ways to do it the no-code approach the usage of the robust WordPress web site builder, Divi.
What are CSS Categories, and How do They Assist?
CSS (Cascading Taste Sheets) is the code that controls the design and look of components, equivalent to colours, spacing, and fonts, on a web site. A CSS category is a reusable label you assign to a couple of components so you’ll taste them unexpectedly as an alternative of repeating the similar procedure for every part.
With out CSS categories, you’d must manually taste every part, which turns into time-consuming—particularly when running on better WordPress websites with a couple of pages. However as is regularly the case, maximum internet sites come with repeating components and motifs, such because the buttons on a pricing web page or characteristic bins throughout other sections.

Those components glance an identical as a result of, within the backend, they proportion the similar category workforce. So while you observe CSS to 1 part of a not unusual category workforce, each and every part in it routinely inherits the similar taste settings. At the entrance finish, this provides them a visually an identical look. CSS categories save time, stay the design constant, and make long term edits more uncomplicated—because you most effective want to replace the category as an alternative of adjusting every part one at a time.
Techniques to Upload CSS Categories to WordPress
You’ll upload CSS categories to a WordPress web site in a couple of techniques, relying in your skillability in the usage of CSS. I’ll display you methods to do it the usage of WordPress Customizer and a plugin like Easy Customized CSS however each those strategies require you to jot down CSS.
Skip to the third method in the event you’re extra within the no-code means.
1. The usage of WordPress Customizer
Let’s say your WordPress web page has a couple of buttons. They recently glance simple, and you need them to face out, so you propose so as to add a army blue border and sky blue background.

Including CSS to every button will take you really extensive time as you’ll have to copy the method 8 occasions. However with CSS categories, you’ll merely assign the similar CSS category to every button and write the CSS most effective as soon as. Let’s identify our CSS category ‘custom-a’. For your WordPress web page editor window, click on on any button > Settings (equipment icon) > toggle down the Complicated possibility. Now, write the category identify in Further CSS Categories.

Repeat the method for every button and Save. So as to add the styling code to those buttons, you’ll must navigate to WordPress Customizer > Further CSS.

To make the border army blue and the background sky blue, you’ll paste your CSS right here.
Realize that the CSS category identify we selected comes earlier than the styling laws within the code. This makes positive that the code is implemented to each and every part that has this category identify assigned.
After you hit Put up and preview your web page, the styled buttons will seem like this:

That’s easy—if you realize CSS.
WordPress Customizer may be nice for making minor adjustments. Alternatively, the issue is that the CSS added there may be tied to the theme, because of this it can be misplaced in the event you transfer subject matters. So, in the event you like checking out other subject matters in your web site, you’ll must replace the code each and every time you turn to another theme, which isn’t amusing. If that’s the case, installing a plugin to stay your CSS category types secure is a significantly better possibility.
2. The usage of a Plugin like Easy Customized CSS
If you set up the Simple Custom CSS plugin, the Customized CSS possibility shall be added to the Look segment. Now you most effective want to upload your CSS code and Replace Customized CSS to mirror the adjustments. (You continue to want to assign category names to components that you need to have not unusual types.)

Plugins like this stay your tradition CSS intact, even though you convert your theme later. It’s additionally slightly extra arranged than WordPress Customizer. Alternatively, each strategies aren’t scalable as they may be able to simply transform cluttered while you save tradition CSS for a couple of part teams of all your web site.
That’s why, for site-wide styling, the really helpful way is to create a child theme and update its stylesheet. This fashion, your whole adjustments are saved secure to your kid theme, even after theme updates.
Even if efficient (and really helpful by means of coders), this system can briefly transform technical because it nonetheless calls for handbook paintings—you’ll must taste every part (or a couple of components the usage of CSS categories), which is time-consuming and now not beginner-friendly. You’ll additionally must stay monitor of sophistication names—simply consider you need to edit a selected button category, and also you’re scrolling via unending strings of code.
So what if it is advisable scale styling with out writing a unmarried line of code? That’s the place fashionable drag-and-drop web page developers like Divi are available.
3. The usage of a No-code Web site Builder like Divi
The wonderful thing about the usage of a contemporary no-code web site builder like Divi is that you just don’t want to write CSS (or any code in any respect) to use constant types throughout your website. With a visible interface, you’ll assign types to sections, rows, columns, and modules simply by deciding on and customizing design settings.
In Divi, you create Presets as an alternative of CSS categories. For years, Divi presented module-based presets that allow you to save and reuse types for modules like buttons, blurbs, and pictures. However we’ve introduced one thing much more wonderful—Option Group Presets that allow you to pass even additional.
Sooner than Choice Workforce Presets, you have been most effective allowed to use presets throughout modules. As an example, a blurb preset can most effective be utilized in every other blurb. Now, you’ll even proportion settings throughout modules.
As an alternative of customizing one part at a time, Choice Workforce Presets means that you can save types for shared settings—like backgrounds, borders, or textual content types—and observe them to a couple of other components without delay. As an example, if a bit and a column each use a background colour, you’ll save that taste environment as a preset and observe it throughout all related components to create a cohesive design.
Divi simplifies development and saving types as presets via drag-and-drop options with none coding, making site-wide design adjustments quicker and extra available—particularly for non-coders.
Let’s see what I imply in additional element underneath 👇
Divi’s Choice Workforce Presets Make Including CSS Categories More straightforward
Divi’s Option Group Presets take the concept that of CSS categories and simplify it for non-coders. As an alternative of manually writing and assigning categories, you’ll now use Divi’s visible builder to use shared design types throughout other components with only some clicks.
Those presets paintings at the possibility degree, that means they aim particular design settings like background colours, borders, or spacing which are shared throughout a couple of part sorts. So, as an example, a bit’s background settings will also be implemented to a column, row, or even textual content part.
It’s a quicker, more uncomplicated, and extra intuitive method to stay your web site design constant. Right here’s how:
- Reusable Kinds Throughout Parts: You don’t want to customise each and every part manually. Save possibility workforce types as presets and observe them to any part.
- International Updates with a Unmarried Edit: Alter a preset as soon as, and all components the usage of that preset will routinely replace. This makes design changes fast and environment friendly throughout all your web site.
- Mix More than one Presets: Layer and blend other presets (e.g., borders, shadows, textual content types) on any part for a versatile and artistic design aggregate with out ranging from scratch.
- Customise Default Presets for Base Kinds: Save presets as default to routinely observe them to all related components.
Learn More About Option Group Presets
Easy methods to Use Divi to Upload CSS Categories to WordPress With out Coding
Now that you realize what are Divi’s Choice Workforce Presets and that you just don’t want to know coding to paintings with them, I sought after to turn you ways precisely it really works throughout the Divi builder. What you want to do to create, save, and observe workforce presets to any possibility settings like background, border, box-shadow, and so forth. For our instance, let’s customise a pricing web page.

Converting the Button Background
Think I need to exchange the button background to red to check the web page’s colour. So, I’ll customise the primary column’s button and save the settings as a Number one Gentle button preset. (The black colour within the UI settings displays you’re enhancing a environment preset. In case you’ve decided on the dark mode, it’ll be the other.)

Now, to use the similar settings to the opposite two buttons, I’ll merely exchange the Button preset to Number one Gentle.

Converting a Column’s Shadow
Let’s upload a field shadow to the entire columns. I’ll upload a field shadow to the primary column and put it aside because the Shadow field shadow preset.

To use the similar shadow at the different two columns, I’ll merely exchange the Field Shadow preset to Shadow.
Editing Textual content Presets
You’ll additionally alter types for textual content components, equivalent to H1 and H2s. Right here’s how updating the columns H3 preset works:
After saving, right here’s how the pricing web page will glance:
Even if I’ve made minor adjustments to turn you the way it works, you’ll consider the chances. With Divi’s Choice Workforce Presets, enhancing tradition types of teams is so simple as a click on of a button. However that’s simply the top of the iceberg. You’ll additionally:
- Set default presets for option groups so base components like headings or buttons inherit your styling routinely around the website. As soon as you know the way default presets paintings, you’ll by no means return to the usage of outdated strategies.
- Layer Choice Workforce Presets on most sensible of Component Presets so as to add further emphasis—like making use of a shared background after which stacking a shadow or border taste to be sure components stand out.
We’ve written a complete information on the entirety you must learn about Divi’s Choice Workforce Presets. Learn the overall article to get design concepts and recommendation on methods to simplify class-based internet design with Divi.
Learn More About Option Group Presets
Divi is a Recreation Changer for Elegance-Based totally Design Gadget
Divi’s Choice Workforce Presets convey the ability of CSS categories to everybody. Whether or not you’re designing solo or taking part with a staff, presets accelerate your workflow, scale superbly as your website grows, and make constant styling easy. They’re quicker, extra environment friendly, and way more intuitive than conventional CSS workflows.
Get Began With Divi 5 Nowadays
Divi 5 is in full-on replace mode. We’re launching new options each and every week, similar to Choice Workforce Presets, it’s a good suggestion to learn about Advanced Units, CSS Design Variables, and lots of extra that adjust the way you way designing any web site.
Divi 5 is a formidable design framework with robust gear like Divi Dash, Divi Quick Sites, and Divi AI—constructed that will help you create tradition, skilled internet sites with out touching a unmarried line of code. There’s not anything proscribing you, in a position to take a check power into the way forward for web site design?
The put up How to Add Custom CSS Classes to WordPress (3 Easy Ways) seemed first on Elegant Themes Blog.
Contents
- 1 What are CSS Categories, and How do They Assist?
- 2 Techniques to Upload CSS Categories to WordPress
- 3 Divi’s Choice Workforce Presets Make Including CSS Categories More straightforward
- 4 Divi is a Recreation Changer for Elegance-Based totally Design Gadget
- 5 WordPress Webhosting » Your Website online’s Secret Weapon: WordPress Webhosting In…
- 6 How companies can paintings smarter and develop their companies with Kinsta
- 7 Press This Podcast: A WordPress Thanksgiving with David Vogelpohl



0 Comments