Limiting likes in a specific category

Hello everyone!

After trying to figure out a way to limit the trust levels, and seeing it is something complex in our case, we were thinking about the option of limiting or avoiding likes in a specific category. Since the likes are counted in trust levels, this could be useful so that in a specific category the users can’t give likes (it would be just a read and respond category, no new posting)

That way, the likes only count outside of that category, and therefore the activity in that category won’t suffice to scale up trust levels.

Any thoughts on if this is possible?

And if it’s not, I was thinking of an option: would there be a way to add in this tab (category > security) a “likes” option too so that when I adjust a category I can define that X users can’t like in it?

Any help would be more than welcome, thanks!!

AFAIK you can’t — but I don’t have any deeper knowlegde here.

But… Is it possible to take easy road? Do your users really need all the tools that higher TL automatically gives? Then you could limit users to TL2 and give TL3 manually to those few who has will, need and knowledge use those tools.

Then it doesn’t matter how many likes they give or get.

1 Like

It would be pretty simple to use css to hide the like button in a category.


Really? Is that code available somewhere? @pfaffman thank you so much, you are always so helpful! :slight_smile:

Thank you for the proposal @Jagster, it could be an option but it’s quite a big community and we need the TL3 automated.

This option that @pfaffman proposed seems the perfect solution to ALL my problems, I can’t believe it too me so long to get there :sweat_smile:

By the way, and sorry if this question is too obvious, but I understand t would hide the like button from each post or reply inside the category specified, right?

If that’s so, you just made my day!

Excited Season 2 GIF by The Office

Just add this in the CSS of a theme component, replacing SLUG with the slug of the category.

body.category-SLUG button.toggle-like {
  display: none;

Thank you so much Richard, that worked perfectly well and solved all my problems :smiley:


But that is stopping liking for good at some categories, not limiting. Sure, if you get what you need then it is perfect solution indeed.

Yes, it restricts likes from that category altogether. It’s a tiny bit of CSS.

Limiting the number of likes in specific categories would require a plugin that would not be easy to write.

1 Like

It is important to notice that the CSS is only hiding the button in the UI.

The button can be displayed again using the browser devtools or the API endpoint can still be called manually if the user knows what is doing as has incentive to do so.

That said hiding the button should be enough to stop 99.9% of the users unless your audience has technical background or a very good incentive to try unlocking the likes again in the category.


And the remaining 0.1% would immediately be caught since the like would be shown beneath the post.


Yep, that’s the idea. Since it would be a group of users which we are more familiar with (they are students), it would be easy to “catch” anyone who tried to trick this.

Yeah, in our case it is :slight_smile:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.