Display Like Counts on Home Page Topic List

Is it possible to display like counts on the home topic list next to “Replies”?

1 Like

Yes, just add:
at the end of your URL.

Discourse Meta - The Official Support Forum for Discourse


does it mean we have to change the home page URL to this in our application set up?

Use this script, add it in admin/customize/css_html in the </body> tab

var TopicListComponent = require('discourse/components/topic-list').default;
    showLikes: true

It shows the column Like in your homepage between the columns Replies and Views.


Thanks Daniela! 2 questions though if you don’t mind:

  • Will this perform any additional HTTP requests to the server? I’m on a high traffic server and need to be careful with adding more load.
  • Can you also make this show only the op_likes?


In that case you have to set showOpLikes: true in above code instead of showLikes.


Hmm, when I do that the likes column will be displayed, but not a single post displays a like. I did confirm that several of them have likes on the OP.

Then you have to use above solution from SidV. That will work perfectly.

1 Like

Could anyone tell me how to modify the above code from @Dax so it just shows Likes on one subforum?