# Category name after category image

**URL:** https://meta.discourse.org/t/category-name-after-category-image/124172
**Category:** Support
**Created:** [July 28, 2019, 9:18am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172 "2019-07-28T09:18:48Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![GamerBank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gamerbank/32/151155_2.png) [@GamerBank](https://meta.discourse.org/u/GamerBank)
#### Post date: [July 28, 2019, 9:18am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/1 "2019-07-28T09:18:48Z")

</div>

**Hello guys,**

Before come here to ask for help i’ve tried everything but without sucess until now 😅

I’m trying to put category name after category image like the FiveM Forum ([https://forum.fivem.net](https://forum.fivem.net))

 ![shit](https://global.discourse-cdn.com/meta/original/3X/2/5/252c65f9eac83ac5eff7534347196b1e5e0876f3.png)

**Already tried :**

- Edit category-title-link.hbs through docker image (docker -it imagename sh - \var\www\discourse\app\assets\javascripts\discourse\templates\components\category-title-link.hbs) ❌

- Using JQuery $( “category-text-title” ).insertBefore( “category-logo.aspect-image” ) on theme editor, i’ve discovered that dont work ❌

- Some css trics (flex, order, table) ❌

**I’ve see in fivem forum, they changed the divs order but is nothing on css or if is, im not good enough to find where.**

Im the wordpress guy, hope someone more experienced to help, thanks in advice ❤

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [July 28, 2019, 9:35am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/2 "2019-07-28T09:35:12Z")

</div>

According to my primary research, the template name seems to be `categories-only.hbs`  
Try changing that. I haven’t tried it but I think it should be the template you are intending to change.

Secondly, I wouldn’t recommend changing it in discourse. A better way is to override the template.

---

<div class="post-metadata">

### Author: ![GamerBank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gamerbank/32/151155_2.png) [@GamerBank](https://meta.discourse.org/u/GamerBank)
#### Post date: [July 28, 2019, 9:46am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/3 "2019-07-28T09:46:59Z")

</div>

> [@fzngagan](#):
>
> categories-only.hbs

The category-title-link.hbs contains exactly what im trying to change, but when i edit, theres no changes, do you know if needs to rebuild the app or something like that when edit hbs files?

```
{{category-title-before category=category}}
<a class="category-title-link" href={{category.url}}>
  **<div class="category-text-title">**
    {{#if category.read_restricted}}
      {{d-icon 'lock'}}
    {{/if}}

    <span class="category-name">{{dir-span category.name}}</span>
  </div>
  {{#if category.uploaded_logo.url}}
    {{cdn-img
      src=category.uploaded_logo.url
      **class="category-logo"**
      width=category.uploaded_logo.width
      height=category.uploaded_logo.height}}
  {{/if}}
</a>

```

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [July 28, 2019, 9:50am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/4 "2019-07-28T09:50:15Z")

</div>

If you edit ember code, you don’t need to restart the complete application, but make sure you hard reload the browser window so that you’re not seeing something the browser has cached.

---

<div class="post-metadata">

### Author: ![GamerBank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gamerbank/32/151155_2.png) [@GamerBank](https://meta.discourse.org/u/GamerBank)
#### Post date: [July 28, 2019, 9:53am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/5 "2019-07-28T09:53:35Z")

</div>

After the changes, i’ve restart the docker container and restart the web server haha 😅

I reloaded the page thousand of times and tried through incognito also

**No changes** 🤣

---

<div class="post-metadata">

### Author: ![GamerBank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gamerbank/32/151155_2.png) [@GamerBank](https://meta.discourse.org/u/GamerBank)
#### Post date: [July 28, 2019, 9:56am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/6 "2019-07-28T09:56:39Z")

</div>

Just confirm for me please, im editing in the correct directory ?

`\var\www\discorse\app\assets\javascripts\discourse\templates\components`

the “templates” folder sounds that just a templates and not what is live, but im not understand that kind of programming, so is just a guessing

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [July 28, 2019, 9:58am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/7 "2019-07-28T09:58:31Z")

</div>

Try deleting the `tmp` folder in the discourse root directory and then restart the server.

---

<div class="post-metadata">

### Author: ![GamerBank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gamerbank/32/151155_2.png) [@GamerBank](https://meta.discourse.org/u/GamerBank)
#### Post date: [July 28, 2019, 10:13am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/8 "2019-07-28T10:13:47Z")

</div>

![Anota%C3%A7%C3%A3o%202019-07-28%20071003](https://global.discourse-cdn.com/meta/original/3X/6/1/61b8450f92c75ccb3e841620c3c91c8bea5a2a6e.png)

̶T̶h̶a̶t̶’̶s̶ ̶w̶h̶a̶t̶ ̶i̶m̶ ̶d̶o̶i̶n̶g̶

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 28, 2019, 10:27am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/9 "2019-07-28T10:27:39Z")

</div>

Why would you do that? This is a CSS change, through admin, customize.

---

<div class="post-metadata">

### Author: ![GamerBank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gamerbank/32/151155_2.png) [@GamerBank](https://meta.discourse.org/u/GamerBank)
#### Post date: [July 28, 2019, 10:31am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/11 "2019-07-28T10:31:16Z")

</div>

Can you help me with this ? as i said i tried everything 🤣

> Some css trics (flex, order, table) :x

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 28, 2019, 12:26pm UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/12 "2019-07-28T12:26:59Z")

</div>

See [Developing Discourse Themes & Theme Components](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648).

---

<div class="post-metadata">

### Author: ![GamerBank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gamerbank/32/151155_2.png) [@GamerBank](https://meta.discourse.org/u/GamerBank)
#### Post date: [July 28, 2019, 12:30pm UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/13 "2019-07-28T12:30:03Z")

</div>

Thank you Jay, but i’m not a developer, i know some things but as we can see, no enough to solve this, i really tried everything, including search for similiar topics here, no sucess 😪

---

<div class="post-metadata">

### Author: ![GamerBank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gamerbank/32/151155_2.png) [@GamerBank](https://meta.discourse.org/u/GamerBank)
#### Post date: [July 29, 2019, 2:56am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/14 "2019-07-29T02:56:35Z")

</div>

Hey Jay, thank you so much, **i’ve did** 😍

If someone is looking for that solution, just do this:

Go to **Settings \> Admin \> Customize \> Select active theme \> Edit CSS/HTML**

In `</body>` field, put this code :

```
<script type="text/x-handlebars" data-template-name="components/category-title-link">
{{category-title-before category=category}}
<a class="category-title-link" href={{category.url}}>
    {{#if category.uploaded_logo.url}}
    {{cdn-img
      src=category.uploaded_logo.url
      class="category-logo"
      width=category.uploaded_logo.width
      height=category.uploaded_logo.height}}
  {{/if}}
  <div class="category-text-title">
    {{#if category.read_restricted}}
      {{d-icon 'lock'}}
    {{/if}}

    <span class="category-name">{{dir-span category.name}}</span>
  </div>
</a>
</script>

```

And tada, **its done** 🥳🎉🎉

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 29, 2019, 3:40am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/15 "2019-07-29T03:40:25Z")

</div>

> [@GamerBank](#):
>
> Hey Jay, thank you so much, **i’ve did**

So you were a developer after all!

---

<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: [August 28, 2019, 3:40am UTC](https://meta.discourse.org/t/category-name-after-category-image/124172/16 "2019-08-28T03:40:41Z")

</div>

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