Hi everyone,
I’m trying to display a custom element from the Banner Featured Links only on the topics (home) page and hide it on individual topic pages or elsewhere. I’ve experimented with different CSS selectors and combinations, but I haven’t had any luck getting it to behave as expected.
Does anyone have experience with targeting specific Discourse pages using CSS? For example, I want the custom links to show only on the main topics list page but not on individual topic pages or category views.
Here’s what I’ve tried so far:
body#topic_795 .banner-featured-links__link {
display: none;
}
body.page-categories .banner-featured-links__link,
body.page-site-feedback-tutorials .banner-featured-links__link {
display: none !important;
}
I’m specifically asking about CSS control because I want to directly manage how elements are displayed based on the page context, not request a Theme Component modification. That’s why I didn’t post this under the Banner Featured Links Theme Component topic.
If anyone knows the correct classes or any tips to properly target the main topics (home) page, I’d appreciate the guidance!
Thanks in advance!