# Hide elements on individual topic pages

**URL:** https://meta.discourse.org/t/hide-elements-on-individual-topic-pages/351236
**Category:** Support
**Created:** [February 8, 2025, 2:44pm UTC](https://meta.discourse.org/t/hide-elements-on-individual-topic-pages/351236 "2025-02-08T14:44:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![BrianC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brianc/32/487568_2.png) [@BrianC](https://meta.discourse.org/u/BrianC)
#### Post date: [February 8, 2025, 2:44pm UTC](https://meta.discourse.org/t/hide-elements-on-individual-topic-pages/351236/1 "2025-02-08T14:44:26Z")

</div>

Hi everyone,

I’m trying to display a custom element from the **[Banner Featured Links](https://meta.discourse.org/t/banner-featured-links/327497)** 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!

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 8, 2025, 2:51pm UTC](https://meta.discourse.org/t/hide-elements-on-individual-topic-pages/351236/2 "2025-02-08T14:51:08Z")

</div>

Hey, did you try `url must contain` setting? You can define URL paths where the links should appear. I believe by default it defines several paths, you could just use the path of your main topics list page, would it that work for you?

---

<div class="post-metadata">

### Author: ![BrianC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brianc/32/487568_2.png) [@BrianC](https://meta.discourse.org/u/BrianC)
#### Post date: [February 9, 2025, 4:24am UTC](https://meta.discourse.org/t/hide-elements-on-individual-topic-pages/351236/3 "2025-02-09T04:24:50Z")

</div>

> [@Arkshine](#):
>
> I believe by default it defines several paths, you could just use the path of your main topics list page, would it that work for you?

Thanks much @Arkshine . That plugin actually handles the pages through the defined paths. Appreciate you pointing that out. Simple solution. Didn’t realize the setting purpose. 🥳

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 11, 2025, 4:25am UTC](https://meta.discourse.org/t/hide-elements-on-individual-topic-pages/351236/4 "2025-03-11T04:25:29Z")

</div>

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