Show both like and vote button on topics

Continuing the discussion from Voting vs Likes for feature requests:

Thanks @mtan for posting this because I was just looking for the same thing—I enabled voting and discovered that likes disappeared in my self-hosted install.

@Falco I’m not sure if @mtan still needs this but if you could share what CSS is needed to unhide the like button, I would deeply appreciate it!

The like button - and like count - are only removed from topics in categories where you have voting enabled. Topics in categories where you don’t have voting enabled are not affected.

If you’d still like to show the like button and count in topics in categories that have voting enabled then try to add the following to your theme in the common CSS tab:

.topic-post.voting-post button {
  &.like-count,
  &.toggle-like {
    display: block;
  }
}
5 Likes

Thanks for clarifying @Johani and sorry for the inconvenience of having to split the topic for me, I’m yet to familiarize myself with the humongous list of categories and subcategories here, however this does clarify the share a link to this post function. :pray:

Many thanks also for the CSS, I’ve just added it and re-enabled voting and all’s working well.

2 Likes

No worries @silverhuang :+1:

I moved your question to a separate topic to make the solution easier to find in case someone else has the same issue that you did.

5 Likes

@silverhuang What’s your reasoning behind wanting to enable both Voting and Likes? I can see how this can cause confusion so now I think just having one would be a better approach.

2 Likes

@mtan In truth I’m still testing what works best for my particular community. Today is literally day two of the program that I’m running on a private invite-only Discourse and so I’m still open to experimentation as I only have 12 members.

The current hypothesis I suppose is… voting is on the value of a topic, whereas likes as per What are "Likes"? is for expressing agreement, support etc. to another user.

I’m waiting to see if there is any particular preference for either. So far, members seem to be using the like function more, probably because they are more familiar with it, thanks to Facebook etc.