How to use banner topic feature for specific group?

You will need to replace any of the CSS posted earlier with the following. This will hide the entire banner for anons and any users not part of a group that has an associated banner. Once again replace GROUP_ONE, GROUP_TWO, etc with the relevant group names.

body {
    // Hide the banner and all group-specific content by default
    #banner,
    #banner [data-theme-group] {
            display: none;
    }
    
    // Display the banner for the following groups only
    &.primary-group-GROUP_ONE {
        #banner,
        #banner [data-theme-group="GROUP_ONE"] {
            display: block;
        }
    }
    &.primary-group-GROUP_TWO {
        #banner,
        #banner [data-theme-group="GROUP_TWO"] {
            display: block;
        }
    }
    &.primary-group-GROUP_THREE {
        #banner,
        #banner [data-theme-group="GROUP_THREE"] {
            display: block;
        }
    }
}
4 Likes