Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Help with editing a child theme for
Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Apr 4, 2017 - 2:34 am

So, I want to display only the user's badge and not the badge plus the name of the group he's in. 

I see this command below but it only seems to allow turning both (badge and name) on and off. Is there a code for only the badge (kinda the same way you display badges for people on this forum?) or a way to just display the badge via forum settings?

sp_PostIndexUserMemberships('tagClass=spPostUserMemberships spCenter');

Example attached

badge.png

Thank you in advance!

Max

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 4, 2017 - 3:22 am

You need to add an extra argument to that template display function so that it codes as:

sp_PostIndexUserMemberships('tagClass=spPostUserMemberships spCenter&showTitle=0');

see the &showTitle=0 attached to the end of the argument list.

Of course this really should be done using a child theme to avoid losing changes on future updates.

For full details of using a child theme see: 
https://simple-press.com/docum.....ild-theme/

For full details of the sp_PostIndexUserMemberships() template function see:
https://simple-press.com/docum.....mberships/

andy-signature.png
YELLOW
SWORDFISH
Avatar
Maximillion
Member
sp_UserOfflineSmall Offline
Apr 4, 2017 - 3:54 am

Awesome! Thank you! That did the trick!

And yes - we're using a Child theme - super easy to setup using the instructions you provided and the already made template (which we copied and renamed as instructed).

Great stuff and thanks again!

Max

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 4, 2017 - 3:55 am

You're welcome and thanks for the update. Glad you have it as you want it.

andy-signature.png
YELLOW
SWORDFISH
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: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17356
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10122
Posts: 79610