كيفية إخفاء 0 تصويت؟

Could you let me know how exactly to use this feature? I don’t see any configurable options for the plugin that allow me to hide the ‘0 votes’ from the topic list. I don’t see any options in the themes page either?

It’s just custom CSS. Create a new theme component (in the admin UI) and then add the css.

Hmm, I’m not very conversant in CSS/HTML. It would have been awesome to have this as a plugin option to enable/disable.

Do you think you could possibly share the exact steps and the content of the CSS to follow to achieve this.

Thanks in advance.

Hey @RBoy :slight_smile:
I suggest you have a look at this official guide: Make CSS changes on Your Site

And especially this section: https://meta.discourse.org/t/make-css-changes-on-your-site/168101#where-do-i-add-my-css-5

3 إعجابات

I’ve added an updated CSS snippet that will hide the 0 vote tag and also hides the last comma for most users: Minor bug report in hiding "0 votes" from topic list - #5 by awesomerobot

As mentioned in the linked topics above, this would be added under admin/customize/themes/edit CSS/HTML in the Common section.

4 إعجابات

That’s amazing. :pray: ……

إعجاب واحد (1)

I’d like to report a bug in this new code. It’s hiding tags from post which have 0 votes.

إعجاب واحد (1)

Oh you’re right, thanks for letting me know, I just made an update. Hiding the 0 count should be separate like this:

.vote-count-0 {
  display: none; // hide 0 vote count
}

.discourse-tags:has(.vote-count-0) { 
  .discourse-tag:nth-last-child(2):after {
     display: none; // hide the comma on the second to last tag
  }
}

إعجابَين (2)

That worked, thanks…

إعجاب واحد (1)

Slightly unrelated question. Are customizations to themes/colors backed up/restored as part of the backup/restore feature?

إعجاب واحد (1)

Yes, backups include all the changes you’ve made to a Discourse site.

3 إعجابات

You may want to update the code on the original post

إعجاب واحد (1)

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