Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Limit Roles Showing under User
Avatar
TIMM
Eastern Arizona
Member
Free Members
sp_UserOfflineSmall Offline
Dec 18, 2018 - 6:16 pm

Hey all,

As you can see in the screenshot attached there is multiple roles showing for our members, most of them superfluous but we do make use of the multiple roles for other reasons, so going back to just one is not really an option. Is there an easy way to change this?

 ss2.jpgImage Enlarger

Thanks,

Michael

200-blue-ns.png

Avatar
Simple Press
Admin
sp_UserOfflineSmall Offline
Dec 18, 2018 - 6:26 pm

Hi:

I'm not sure what you're asking here when you say "Is there a way to change this".  Can you be a bit more specific as to what you need to change - from what to what?

Thanks.

Avatar
TIMM
Eastern Arizona
Member
Free Members
sp_UserOfflineSmall Offline
Dec 18, 2018 - 6:45 pm

Under the Username and Avatar, there is a list of the users roles in this case, (New Member, Member, Mentor, Mentor Snuffles) we originally had only single WordPress roles, in Snuffles' case it was just "Mentor", we had to move to multiple roles for various things and now all the roles show instead of just the main one.

 

Thanks,

Michael

200-blue-ns.png

Avatar
Simple Press
Admin
sp_UserOfflineSmall Offline
Dec 18, 2018 - 11:45 pm

Hi:

Some CSS might do the trick.  Try putting something like this in your FORUM->THEMES->CUSTOM CSS area:

#spPostIndexUserMemberships20 span:nth-of-type(1) ~ span {
display: none;
}

Thanks.

Avatar
TIMM
Eastern Arizona
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2018 - 3:53 pm

I think we are on the right track of using CSS to do display: none, but that snippet didn't seem to do the trick, might need a little more to it. Any ideas on how to continue with this snippet?

Thanks,

Michael

200-blue-ns.png

Avatar
Simple Press
Admin
sp_UserOfflineSmall Offline
Dec 19, 2018 - 3:59 pm

That's the code that worked on our test site - you can see the thread here: https://wp50test01.vnxv.com/fo.....r-have/.  (You might have to register an account to see the thread).

Once you're viewing the thread, the user spuser02 has three memberships (Guests, Members and VIP).  But only the first one is shown - "Guest".  You can see the other hidden two if you look in the html source code (search for the string "VIP" and you'll get to the area where that data is located).  

Your classes or IDs might be different for various reasons so you might have to use your browser tools to get the right CSS IDs and Classnames. 

Thanks.

Avatar
TIMM
Eastern Arizona
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2018 - 4:12 pm

Ok that did point me in the right direction, the first one in the list was 3 then 4, so would i have to add the custom CSS for each user, it is working when I did that, I don't know that you can do a loop in CSS, but I would be handy.

Michael

200-blue-ns.png

Avatar
TIMM
Eastern Arizona
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2018 - 5:24 pm

I ended up using the following, it turned them all off but keeps the member status of the forums:

.spPostUserMemberships { display: none !important; }

200-blue-ns.png

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626