How can I replace like icon?


I want to replace “like” button(which is a heart now) in my community. I know this extension but it cannot replace it with custom SVG. How can I add a custom SVG for like buttons? By the way, I’ve tried to add it my theme and referance it in about.js but it did not work either.


We have done it in the section of Edit CSS/HTML, this still seems to work for us:

<script type="text/discourse-plugin" version="0.8">
    api.replaceIcon('d-liked', 'thumbs-up');
    api.replaceIcon('d-unliked', 'thumbs-o-up');
    api.replaceIcon('heart', 'thumbs-up');
    api.replaceIcon('notification.liked', 'thumbs-o-up');
    api.replaceIcon('notification.liked_2', 'thumbs-o-up');
    api.replaceIcon('notification.liked_many', 'thumbs-o-up');

I know this is working, but the question is how can I add custom icons? I want to add my own icons.


I’ve already tried this, no luck.

It’s because you need to add the icon you want to use into your SVG icon subset site setting.

Add the ones you want to use, then use the fa icon in your theme/component.


Search around the forum, you’ll find many existing answers that’ll help a lot :slight_smile: