CSS to suppress trust levels and invited by on user profiles

(Tobias Eigen) #1

I’d like to suppress the “trust level” and “invite by” info on user profile pages. Can someone please share the custom CSS for doing this? Would be very appreciative. :thumbsup:

Continuing the discussion from Renaming Trust Levels:

(cpradio) #2

I’d need to find an example where it has the Invited By content, but as for Trust Level, it seems there isn’t. It doesn’t have any markup hints such as a class for me to target that information with, which means I’d end up hiding all of that secondary detail.

Just confirmed invited by would be impossible to hide on its own as well with only CSS

(Tobias Eigen) #3

thanks for looking into this - really grateful.

here’s a classic example: Profile - vivekmaru - Global Legal Empowerment Network Community Discussions

we don’t use the invitations feature anymore (haven’t since March since setting up SSO) so would actually be open to just removing the invitations altogether. I guess asking how to wipe out that info is a separate request.

as for trust levels, we are still discussing how to use them, what to call them, and to what extent we want to encourage members to move up in trust levels and even understand what they are. so in the meantime we’d like to suppress them from profiles if that’s possible.

(cpradio) #4

Does the Discourse Team mind if I submit a PR to add classes to these two specific items since it serves an actual need for someone?

I don’t mind submitting such a PR, and I’d only add them to the items currently in need of being hidden (not all items in that secondary section – unless otherwise noted by the team).

(Régis Hanol) #5

Not a problem at all. PRs that allows for easier customization are always welcome :wink:

(cpradio) #6

PR Submitted

@tobiaseigen, the CSS you need to add to your customize section is

.secondary .trust-level, .secondary .invited-by {
  display: none !important;

(Tobias Eigen) #7

I just tried using this same method to suppress groups from user profile pages. It works but the word ‘groups’ remains for some reason. Am I doing this wrong or is there a need for another fix similar to what @cpradio did for invited_by and trust_level fields?

Here’s my css:

.secondary .trust-level, .secondary .invited-by, .secondary .groups 
{ display: none !important; }

And here’s a screenshot:

Incidentally, I’d rather not have to do this since it’s handy for people who should have access to see groups be able to see them on user profiles. But we have to do this since it appears to be impossible to suppress groups from this list even if “Group is visible to all users” is deselected.

(cpradio) #8

It needs a similar change.

(cpradio) #9

PR Submitted

(Tobias Eigen) #10

my hero. many thanks! :rocket:

(cpradio) #11

FYI, this is merged, and your CSS should cover it without any modifications due to .secondary .groups :slight_smile: