Custom like button no longer appears after

I had the following code installed in my custom theme under the </head> section:

   <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');               // profile pages 
          api.replaceIcon('notification.liked', 'thumbs-up');  // notifications 
    </script>

Previously while on 2.5.x this was working to replace the heart, but now the custom icon is gone, and there is no heart. Has the method changed for replacing the heart? Thanks.

There’s been some cleaning up in the icon library if I remember correctly.

Could you try adding in the setting : svg icon subset, the icons

fa-thumbs-up
far-thumbs-up

The script might need some edit too, but I’m not sure if it will work with this

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

or

   <script type="text/discourse-plugin" version="0.8"> 
          api.replaceIcon('d-liked', 'fa-thumbs-up'); 
          api.replaceIcon('d-unliked', 'far-thumbs-up'); 
          api.replaceIcon('heart', 'fa-thumbs-up');               // profile pages 
          api.replaceIcon('notification.liked', 'fa-thumbs-up');  // notifications 
    </script>

I tested on a theme component I use for christmas (gift icon instead of heart) and it works, so the javascript is still good

3 Likes

Sorry for the additional question, but where is this done?

your-forum/admin/site_settings/

search for this setting and you’ll find it easily

3 Likes

Awesome thanks so much! Found it:

1 Like