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?
AI-generated summary
The discussion revolves around hiding ‘0 votes’ from the topic list in a Discourse site. RBoy initially shares a link from meta discourse but is unsure how to implement the feature. mattdm clarifies that it requires custom CSS.
RBoy requests the exact steps and CSS code, which is later provided by awesomerobot in the form of a CSS snippet. However, RBoy reports a bug in the code, which awesomerobot promptly fixes.
RBoy confirms that the updated code works. Additionally, RBoy inquires about the backup and restore feature, to which awesomerobot responds that customizations are included in backups.
The final CSS code to hide ‘0 votes’ is:
.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
}
}
This code should be added under admin/customize/themes/edit CSS/HTML in the Common section.
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 ![]()
I suggest you have a look at this official guide: Making custom 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
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.
That’s amazing.
……
I’d like to report a bug in this new code. It’s hiding tags from post which have 0 votes.
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
}
}
That worked, thanks…
Slightly unrelated question. Are customizations to themes/colors backed up/restored as part of the backup/restore feature?
Yes, backups include all the changes you’ve made to a Discourse site.
You may want to update the code on the original post