Support Forum

Help with editing a child theme for

MA Maximillion
Maximillion
Member

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

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

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/documentation/codex/themes/theme-basics/creating-a-child-theme/

For full details of the sp_PostIndexUserMemberships() template function see:
https://simple-press.com/documentation/codex/api/template-functions-and-the-api/display-template-functions/topic-view/sp_postindexusermemberships/

MA Maximillion
Maximillion
Member

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

YS Yellow Swordfish
Yellow Swordfish
Member

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