CSS to show element on topics but not category page

I created a simple component to have a banner above topics in a certain category, but I don’t want it to show on the category page, is this possible? Here is my current css

.image-gallery-banner {
    display: none;
}

[class*="image-galleries"] {
    .image-gallery-banner {
        display: flex;
    }
}

This is the page I want to hide it from https://community.naturephotographers.network/c/image-galleries but have it visible in the category’s topics.

I think adding this might do the trick:

.category-header .image-gallery-banner {
    display: none;
}
3 Likes

Thanks, that worked! It does flash up briefly but I’m not sure there’s any way to avoid that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.