1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Add dynamic CSS

Discussion in 'Free Divi Community Forum' started by sameerm, Feb 27, 2023.

  1. sameerm

    sameerm New Member

    Hello all,

    It would be a really great feature if DIVI could add a function to dynamically add CSS name in the theme builder. For example to add the content title as CSS class or ID. Currently we can only add CSS name manually.

    Regards.
     
    1. PRO MEMBER PERKS Divi Cart Count Plugin - Easily add cart count to your Divi cart icon. 6 different styles to choose from:Learn More
  2. paul_111

    paul_111 New Member

    Yes, indeed, I'm currently looking for a solution, I need to create a layout for dynamic content and since I use popup conected with id I'm stucked :(((
     
  3. Divi Booster

    Divi Booster Divi Expert

    This post explains how to enable dynamic content on the CSS ID and CSS Class fields:

    https://divibooster.com/enable-divi-dynamic-content-on-css-id-and-css-class-fields/

    Once you have dynamic content enabled on the fields you can set the ID / class in a custom field on your posts and then use that value in the CSS ID / class field of your template / layout by selecting the custom field from the now enabled dynamic content option on those fields.

    Alternatively, instead of a custom field, you can use the "Post Slug" dynamic content field added by Divi Dynamic Content Extended to automatically set the CSS ID / class based on the post's slug (which is usually based on the post title), which would more or less achieve what the OP was asking for.

    https://divibooster.com/add-the-post-slug-in-divi-with-divi-dynamic-content-extended/
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Modern & powerful Agency Divi layout pack, featuring team carousel, sliding menu, etc.View Demo