How to Add a Custom Class in Divi 5 (Spoiler: It’s Different Now)

So you’ve jumped into the Divi 5 public alpha. It’s slick, it’s fast, and it feels like unwrapping a brand-new gadget. But then, bam! You go to add a custom CSS class like you always have, and things look a little… missing. Don’t panic, Divi didn’t forget how to do classes, it just moved them somewhere new.

Where Did My CSS ID & Class Options Go?

In Divi 4, you’d cruise into the Advanced tab, expand the CSS ID & Classes toggle, and drop in your magic class name. Easy. In Divi 5, that toggle is gone. Instead, the Attributes panel is now where the action happens.

Step-by-Step: Adding a Custom Class in Divi 5

Where to add custom classes in Divi 5

1. Head to the Advanced Tab

Don’t worry, the Advanced tab is still alive and well. Click it open on the element you’re working with.

2. Find the Attributes Panel

This is where Divi 5 hides all those geeky little options that make designers happy. You’ll see fields for adding custom attributes.

3. Add Your Class

In the Attribute Name field, type class. In the Value field, add your class name (say, my-class). That’s it. Divi 5 will output your element with the correct class applied.

Add your new Divi 5 class as an attribute

4. IDs Work the Same Way

Need an ID instead? Just type id in the Attribute Name field and give it a value. Boom, done.

PRO TIP: Naming your class my-class is fine for demos, but please don’t actually ship a client site like that. Your future self will thank you.

Why Did Divi Change This?

Divi 5 is all about modernizing the builder and making the output cleaner. The Attributes panel consolidates customization options in one place instead of scattering them across toggles. It takes a second to adjust, but once you get used to it, it feels tidier.

Final Checklist

  • Go to Advanced tab → Attributes
  • Add class as Attribute Name
  • Set your custom class name as Value
  • Use id if you need a unique identifier
  • Save and test your CSS targeting

Feels good, right? Now you know where your classes and IDs live in Divi 5. Go ahead and style to your heart’s content without wondering if Divi lost the feature altogether. It didn’t, it just moved house.

Tell Us What You Think!

0 Comments

Submit a Comment

Explore more from Divi Engine

Divi Form Builder

Divi Form Builder

From simple contact forms to complex frontend post or product creation, Divi Form Builder has you covered.

Divi Form Builder
Find out more
Divi Machine

Divi Machine

Build complex websites that displays dynamic fields you can filter, search and so much more with the Divi Builder.      

Divi Machine
Find out more
Divi BodyCommerce

Divi BodyCommerce

A versatile toolkit for developers using Divi and WooCommerce together, designed to boost your e-commerce site and achieve greater conversion rates.    

Divi BodyCommerce
Find out more
Divi Handoff

Divi Handoff

Let clients update content without touching the Divi Builder. Design layouts once, connect them to Flexible Content fields, and give editors simple forms for text, images, and sections.

Divi Handoff
Find out more
Divi Loop Extender

Divi Loop Extender

Unlock the Full Power of Divi 5 Loop Builder Add advanced sorting, filtering, and relationship logic right inside the Visual Builder.

Divi Loop Extender
Find out more
Divi Membership

Divi Membership

Monetize your Divi websites by transforming them into membership sites with seamless subscription management, user-friendly interfaces, and customizable membership tiers.

Divi Membership
Find out more
Divi Machine Accounts

Divi Machine Accounts

Build an account area for your customers to edit their details, access wishlist, submitted posts and more. *Note: Requires Divi Machine installed and active

Divi Machine Accounts
Find out more
Divi Ajax Filter

Divi Ajax Filter

Filter WooCommerce, Posts & Custom Posts without reloading the page.    

Divi Ajax Filter
Find out more
Divi Mobile

Divi Mobile

Divi Mobile helps you create beautiful looking mobile menus without having to code.

Divi Mobile
Find out more
Divi Nitro

Divi Nitro

Give your Divi website that extra boost of speed with our Divi Nitro plugin to enhance your customer's experience.

Divi Nitro
Find out more
Divi Protect

Divi Protect

Password protect the content of your Divi website with our Divi Protect plugin. Keep unwanted eyes out!

Divi Protect
Find out more
Divi Mega Menu

Divi Mega Menu

Create stunning, responsive, and content-rich mega menus using the Divi Builder you already know. No coding required.  

Divi Mega Menu
Find out more