Disable Likes

:bookmark: This guide explains how to disable the “Likes” feature on your Discourse site.

:person_raising_hand: Required user level: Administrator

If you prefer to disable the “Likes” feature on your Discourse forum, here’s a comprehensive guide on how to disable them.

Change relevant site settings

  1. In your site settings, search for post menu and remove the like button:

  1. Adjust the trust level settings to reflect the removal of likes:
  • tl2 requires likes received (set to 0)
  • tl3 requires likes received (set to 0)
  • tl2 requires likes given (set to 0)
  • tl3 requires likes given (set to 0)

These changes will disable the :heart: button on posts and adjust user trust levels accordingly.

Hide references to likes

To avoid confusion from lingering references to likes, apply the following CSS code in a new theme component and add it to your main themes:

/* Hide likes from user profiles */
.top-section.most-liked-section,
.activity-nav a[href*="/activity/likes-given"] {
    display: none;
}
.stats-section li {
    &.linked-stat a[href*="/activity/likes-given"],
    &:last-of-type {
        display: none;
    }
}
.user-secondary-navigation a[href*="/notifications/likes-received"],
.control-group.notifications .controls.controls-dropdown:last-child,
.activity-nav.mobile-nav .drop.expanded li a[href*="/activity/likes-given"],
.notifications-nav.mobile-nav .drop.expanded li a[href*="/notifications/likes-received"] {
    display: none;
}
.top-section {
    .replies-section,
    .topics-section {
        display: none;
    }
}

/* Hide likes from users directory */
.users-directory.directory {
    .sortable {
        &[title*="Received"],
        &[title*="Given"] {
            display: none;
        }
    }
    td {
        &:nth-child(2),
        &:nth-child(3) {
            display: none;
        }
    }
}
.mobile-view .users-directory.directory .user .user-stat {
    &:nth-of-type(2),
    &:nth-of-type(3) {
        display: none;
    }
}

/* Hide likes on about page */
.about.stats tr:nth-child(6) {
    display: none;
}

Update Discobot tutorial

If your Discobot tutorial is active, users will encounter a step where they are asked to like a post.

image

To resolve this, edit Discobot’s messages:

  1. Go to /admin/customize/site_texts and search for the text that refers to likes. Delete the reference to likes.
  2. Search for the Discobot error text and modify it to inform users about the skip function:
    Do you know that you can skip steps in this tutorial? Try typing `skip` in your next reply!
    
    Do not use the %{skip_trigger} variable as it is not available in those translation strings.

Tips and Tricks

Disable badges with references to likes

Consider deactivating badges related to likes:

  • First Like
  • New user of the month
  • Admired
  • Crazy in Love
  • Empathetic
  • Gives Back
  • Higher Love
  • Respected
  • Appreciated
  • Out of Love
  • Thank You
  • Welcome
  • Great Reply
  • Great Topic
  • Good Reply
  • Good Topic
  • Nice Reply
  • Nice Topic

Reset the like count (not recommended)

If you need to reset the like count (not advisable for active communities), follow this guide: Delete all the likes. Note that this is a last-resort reset! The solution of deactivate and hide Likes only with CSS is safer and reversible in the future.

Disable summarize this topic

The “summarize this topic” button (associated with the Discourse AI - Summarization) will no longer appear since it requires a minimum like threshold to function. You may want to disable this feature if you disable likes on your site.

Last edited by @SaraDev 2024-07-16T21:40:00Z

Check documentPerform check on document:
24 Likes

What a scary world with no likes :hugs:

Can someone share how to remove the standard like,

I use beer image and its still connected to the +1

TY