Display Like Counts on Home Page Topic List

(Aislinn Chen) #1

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


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

Discourse Meta

(Aislinn Chen) #3

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

(Daniela) #4

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.

(Bart) #5

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?

(Vinoth Kannan) #6


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

(Bart) #7

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.

(Vinoth Kannan) #8

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

(Ryan LaLiberty) #9

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