Support Forum

Special Rank Badges and Names

WE Weltall
Weltall
Member

Hi there

Could you please teall me how could I remove Special Ranks names in topic view? I would like to see only badges and not their associated rank name.

Thanks

7 Answers

New Answer

IK Ike
Ike
Member

Hey Weltall,

Have you taken a look at the function reference in the Codex for Special Ranks? You should be able to do it with the showTitle argument.

WE Weltall
Weltall
Member

Uhm It seems not working for me

I change showtitle to 0 of sp_PostIndexUserRank function in topic-view-functions.php and also in sp_UserSpecialRank function of common-view-functions.php

Did I do something wrong?

YS Yellow Swordfish
Yellow Swordfish
Member

You should not be editing core code but making changes to your theme templates – the spTopicView template. What SP theme is this you are using and have you made a child theme so you can make changes safely?
But – if you changed the actual functions themselves then it should work so – are we talking about the same thing? And are you using any caching plugin that might be showing old data?
Perhaps a screenshot of what you are referring to would be helpful just so we know…

WE Weltall
Weltall
Member
Immagine-1.jpg

Here it is

I’m not using any cache plugin. My template is reboot.

In topicview.php of my template, what should I change? My knowledge of php is basic, i have to add something here

sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter’);

right?

Also, can you please tell me what is difference between child theme and default themes?

YS Yellow Swordfish
Yellow Swordfish
Member

In reboot you will find the spTopicViewDesktop.php file in the ‘desktop’ folder under the main templates folder. Both the normal and special forum rank functions are defined in there. You need to add a showTitle argument to that. As in:

sp_PostIndexUserSpecialRank(‘tagClass=spPostUserSpecialRank spCenter&showTitle=0’);

Note the ampersand in there. And no spaces.

A child theme will save any changes you make from being lost in subsequent updates of the software and are  very easy to create – we do supply frameworks downloadable from our download pages. See this codex article for in-depth help: 

https://simple-press.com/documentation/codex/themes/theme-basics/creating-a-child-theme/