# Featured Categories Header

**URL:** https://meta.discourse.org/t/featured-categories-header/203779
**Category:** Theme component
**Created:** [September 16, 2021, 10:59pm UTC](https://meta.discourse.org/t/featured-categories-header/203779 "2021-09-16T22:59:32Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [September 16, 2021, 10:59pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/1 "2021-09-16T22:59:32Z")

</div>

| | | |
| --- | --- | --- |
| 📑 | **Summary** | Feature categories on select views. |
| 🛠 | **Repository Link** | [Manuel Kostka / Discourse / Components / Featured Categories · GitLab](https://gitlab.com/manuelkostka/discourse/components/featured-categories.git) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

### Cards view

 ![Featured categories styled as cards.](https://global.discourse-cdn.com/meta/original/4X/e/a/3/ea35eaaf4eb55e93fc8c375ce5d852336e87fdd1.png)

### List view

 ![Featured categories styles as list.](https://global.discourse-cdn.com/meta/original/4X/6/5/0/650218a8b90ea6646846a65ac4dfdad234da6e7c.png)

### Settings

You can switch between the two above layouts or choose _none_ and declare your own styles. You can also pick a route and set an outlet for the component.

 ![Featured Categories component settings](https://global.discourse-cdn.com/meta/original/4X/8/0/7/807606b19d718738f0c2e5d513f9a1d83db5a078.png)

### Template

```scss
.featured-categories {
  &__container {
  }
  &__heading {
  }
  &__list-container {
  }
  &__category-container {
  }
  &__category-link {
    .category-logo {}
    .category-name {}
    .category-description {}
}

```

---

<div class="post-metadata">

### Author: ![Zup](https://avatars.discourse-cdn.com/v4/letter/z/c37758/32.png) [@Zup](https://meta.discourse.org/u/Zup)
#### Post date: [September 21, 2021, 12:17am UTC](https://meta.discourse.org/t/featured-categories-header/203779/2 "2021-09-21T00:17:03Z")

</div>

Handy TC, thank you.

A toggle to display only on homepage, display site logo, and display site description under logo would be desirable additions I imagine.

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [September 23, 2021, 11:59am UTC](https://meta.discourse.org/t/featured-categories-header/203779/3 "2021-09-23T11:59:02Z")

</div>

> [@Zup](#):
>
> A toggle to display only on homepage

Right now it shows on global lists (latest/new/unread/top). I was thinking of adding a drop-down to settings to select the global pages it should show. So, yes, on my roadmap when I have time for this again!

What would be the use case for having the logo? On the global pages you’re almost “home” anyways?

What I’d actually be most interested in adding is a mobile view. I didn’t have an idea for that so far, so it’s just not shown on mobile. Thanks for sharing If you’d have an idea for that!

---

<div class="post-metadata">

### Author: ![Zup](https://avatars.discourse-cdn.com/v4/letter/z/c37758/32.png) [@Zup](https://meta.discourse.org/u/Zup)
#### Post date: [September 23, 2021, 10:04pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/4 "2021-09-23T22:04:00Z")

</div>

> [@manuel](#):
>
> What would be the use case for having the logo?

Personalized aesthetics, and combined with a short description, would be quick insight about a community for new visitors, and serve as a reminder for existing users about the mission of the community. Positioned above or left of the links.

Displaying this on global links by default, as well as optionally per category (and tag pages?), would serve as a convenient navigation menu for prioritized areas - this would be my primary intended use. (By the way, the ability to include custom links - not only categories - would be another desirable feature.)

Personally, I find that most Discourse sites tend to be on the vague side especially upon initial visit, and by default I think Discourse navigation can be confusing for the average user. Generally my sites are designed to prioritize only a few areas (of many), and these proposed additions would make it very clear to the average user what those areas are, as well as easy to access.

---

<div class="post-metadata">

### Author: ![valsha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/valsha/32/230631_2.png) [@valsha](https://meta.discourse.org/u/valsha)
#### Post date: [September 26, 2021, 10:06pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/5 "2021-09-26T22:06:31Z")

</div>

Good component,  
We have installed Versatile Banner, how can we move this component UNDER Versatile Banner?  
So that the component Versatile Banner is shown first and then yours.  
Thank you.

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [September 26, 2021, 10:59pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/6 "2021-09-26T22:59:55Z")

</div>

Yes, both components are rendered on the same outlet. I don’t know what causes the order of elements in that case? On my site it shows under the banner by default..

But you should be able to target the order with CSS declarations:

```plaintext
.below-site-header-outlet.categories-header {
  order: -1 !important;
}
.below-site-header-outlet.banner-themes {
  order: -2 !important ;
}

```

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [September 26, 2021, 11:19pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/8 "2021-09-26T23:19:41Z")

</div>

> [@Zup](#):
>
> By the way, the ability to include custom links - not only categories - would be another desirable feature

This sounds like many custom options though. I wouldn’t want to add that much logic to this component.  
Building a featured navigation sounds more like a use case for a custom html banner to me? You’d just need some links with images and titles.

> [@Zup](#):
>
> I find that most Discourse sites tend to be on the vague side especially upon initial visit, and by default I think Discourse navigation can be confusing for the average user.

I agree with that! I think dedicated banners for visitors and for newly-signed-up users can be helpful and welcoming.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [September 26, 2021, 11:21pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/9 "2021-09-26T23:21:35Z")

</div>

There’s a ‘swap default positioning’ in the Versatile Banner settings, if that’s any good to you?

> swap default positioning
> 
> If there is another banner-related component active, use this to swap its position with the Versatile Banner

---

<div class="post-metadata">

### Author: ![valsha](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/valsha/32/230631_2.png) [@valsha](https://meta.discourse.org/u/valsha)
#### Post date: [September 27, 2021, 10:24am UTC](https://meta.discourse.org/t/featured-categories-header/203779/10 "2021-09-27T10:24:23Z")

</div>

Try this setting, it didn’t help me ☹

---

<div class="post-metadata">

### Author: ![Rhod](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rhod/32/507923_2.png) [@Rhod](https://meta.discourse.org/u/Rhod)
#### Post date: [August 22, 2022, 6:44pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/11 "2022-08-22T18:44:47Z")

</div>

I installed a theme-component but it doesn’t fit inside the main content, making it really look out of place (ugly), I use the air-theme.  
Can help me please where I can make the component appear inside the dark color container?

It looks like this:

 ![2](https://global.discourse-cdn.com/meta/original/4X/7/c/4/7c410932cf1992bf4df991311d2aa45aed7eaa75.jpeg)

I would like it to look like this:

 ![1](https://global.discourse-cdn.com/meta/original/4X/9/0/e/90ec9c871b2ac70c6563675289e0d329d47041bc.jpeg)

---

<div class="post-metadata">

### Author: ![AkaiBukai](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akaibukai/32/295336_2.png) [@AkaiBukai](https://meta.discourse.org/u/AkaiBukai)
#### Post date: [March 3, 2023, 8:47pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/12 "2023-03-03T20:47:50Z")

</div>

Hello,  
I’m just starting with discourse and theming..  
I want to have some kind of cards in the top like you can see in here: [Secret World Legends - Funcom Forums](https://forums.funcom.com/c/secret-world-legends/20)  
This theme component seems to help toward that direction..  
I installed it and I was able to select the categories I want to appear but I got only the titles..  
Which makes sense as I do not set any picture yet..

My question (which is probably a dumb question as no one else have asked it yet) is how I can set the picture of the categories..  
And how I “upload” them?

Thank you for any help..

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [March 9, 2023, 3:15am UTC](https://meta.discourse.org/t/featured-categories-header/203779/13 "2023-03-09T03:15:01Z")

</div>

Goto your Categories settings you used to create category and sekect image tab.

Upload image

 ![Screenshots_2023-03-08-23-14-44](https://global.discourse-cdn.com/meta/original/4X/1/5/4/1544eaa37876d2d0a29cf5b26e9d807a23160115.jpeg)

---

<div class="post-metadata">

### Author: ![Vasan\_Cannane](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vasan_cannane/32/327994_2.png) [@Vasan\_Cannane](https://meta.discourse.org/u/Vasan_Cannane)
#### Post date: [November 6, 2023, 2:45pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/14 "2023-11-06T14:45:01Z")

</div>

Hi I am new to discourse so I have a question on featured Categories Header

 ![3cb500991df9850a7d28f79696df1e0b4626bf17](https://global.discourse-cdn.com/meta/original/4X/0/5/2/052337928f6821c3009d0c6a369b0f3b0b8770f9.png)

I am trying to achieve this but i can’t

They have given a few line of code

```plaintext
html.categories-header{
  .below-site-header-outlet.categories-header {
    .wrap {
      .categories-header-item {
        [each item's link, logo, name..]
      }
    }
  }
}

```

how can i specify the item’s link logo and name

Can anyone clarify this?

Thanks

---

<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: [November 6, 2023, 3:12pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/15 "2023-11-06T15:12:57Z")

</div>

Hi, welcome 👋

If you want to display an image like the one in the example, you need to select the relevant categories in the theme component setting and ensure that they each have an image assigned (category settings → Images → Category Logo Image)

---

<div class="post-metadata">

### Author: ![Vasan\_Cannane](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vasan_cannane/32/327994_2.png) [@Vasan\_Cannane](https://meta.discourse.org/u/Vasan_Cannane)
#### Post date: [November 6, 2023, 3:31pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/16 "2023-11-06T15:31:44Z")

</div>

![Screenshot 2023-11-06 at 9.01.05 PM](https://global.discourse-cdn.com/meta/original/4X/5/8/5/5851d90e944e98659a204d3a1ffe4d3a45378df0.png)  
This is the Featured Categories theme component setting and I can’t find anything ☹

---

<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: [November 6, 2023, 3:37pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/17 "2023-11-06T15:37:15Z")

</div>

You have to edit your category setting:

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/0/b/50b5d57d429b0db05aa715000c6d388ba66223a7.png)

Click on `Images` tab:

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/0/d/30d3fc854be77bb8378b086ea8540f5372651c3c.png)

…and upload a _Categry Logo Image_!

---

<div class="post-metadata">

### Author: ![Vasan\_Cannane](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vasan_cannane/32/327994_2.png) [@Vasan\_Cannane](https://meta.discourse.org/u/Vasan_Cannane)
#### Post date: [November 13, 2023, 6:56am UTC](https://meta.discourse.org/t/featured-categories-header/203779/18 "2023-11-13T06:56:49Z")

</div>

I have a row of products how can i break the products into multiple columns?

 ![Screenshot 2023-11-13 at 12.26.25 PM](https://global.discourse-cdn.com/meta/original/4X/5/8/5/585ba6f9cd639bbec0e3a51f18b3e2956deea79e.jpeg)

---

<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: [November 13, 2023, 11:02pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/19 "2023-11-13T23:02:44Z")

</div>

Something like that?

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/0/c/70c2ddbf139990837781129065ee2d2b007ea875.png)

If so, try this CSS. Add it to your theme CSS or in a component.

Inside, you can see variables you can control.  
You can choose the number of columns, the gap between the elements, and the width of each element.  
The elements are stacking automatically.

```css
.below-site-header-outlet.categories-header > div.wrap {
    --ch-columns: 6;
    --ch-gap: 2.5em;
    --ch-width: 110px;
    
    display: grid !important;
    
    grid-template-columns: repeat(auto-fill, minmax(var(--ch-width), 0fr));
    gap: var(--ch-gap) !important;
    
    max-width: calc(var(--ch-columns) * var(--ch-width) + ((var(--ch-columns) - 1) * var(--ch-gap))) !important;
}

```

---

<div class="post-metadata">

### Author: ![Vasan\_Cannane](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vasan_cannane/32/327994_2.png) [@Vasan\_Cannane](https://meta.discourse.org/u/Vasan_Cannane)
#### Post date: [November 14, 2023, 4:28am UTC](https://meta.discourse.org/t/featured-categories-header/203779/20 "2023-11-14T04:28:12Z")

</div>

Thanks for the help.

Can I ask for one more help

 ![Screenshot 2023-11-14 at 9.57.13 AM](https://global.discourse-cdn.com/meta/original/4X/4/1/d/41daaa9962c166851a493ba4ae0605562b3bc08b.png)  
This is wat i am trying to achieve

can you please help me on that

---

<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: [November 14, 2023, 12:37pm UTC](https://meta.discourse.org/t/featured-categories-header/203779/21 "2023-11-14T12:37:55Z")

</div>

Try something like that:

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/6/8/e68df94303da5f437aaa317c97d5e6a4a3c10b7b.png)

```css
.below-site-header-outlet.categories-header > div.wrap {
    --ch-columns: 4;
    --ch-gap-row: 2em;
    --ch-gap-col: 6em;
    --ch-width: 120px;
    
    & > div {
        width: var(--ch-width);
    }
    
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    
    max-width: calc(var(--ch-columns) * var(--ch-width) + ((var(--ch-columns) - 1) * var(--ch-gap-col))) !important;
}

```

[Next page](https://meta.discourse.org/t/featured-categories-header/203779.md?page=2)
