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
Remove posts counts that comes in () next to admin names at the footer
Avatar
Nev shan
Rookie
Free Members
sp_UserOfflineSmall Offline
Apr 16, 2014 - 8:12 am

I would like to remove the posts counts that comes in () next to admin names at the footer. Please advice. Below is the email I received but unsure on how to do this

 

Not directly, no...  But you can use a filter on the display to remove them... do you know to use standard wp filters?  if so, the filter would be:  sph_AdminsList

then you could just use a remove the post counts...  if you need more help with the details, please open a topic in the support forum...

 

Thanks

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 16, 2014 - 12:34 pm

We are not ignoring you but this is going to need some regular expression work and I am just hopeless at that. We need Mr Papa for this and he wont be around until much later on...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 16, 2014 - 10:53 pm

does that mean you are familiar with the wp api and using filters?  or do you need an explanation on that too?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 16, 2014 - 11:15 pm

you will want to add something like this to your spFunctions.php template file of the sp theme you are using:

add_filter('sph_AdminsList', 'my_adminlist');
function my_adminlist($out) {
    $out = preg_replace('# \(([0-9]+)\)#', '', $out);
    return $out;
}

as always, we strongly recommend you have your own theme instead of editing one of ours to keep from losing changes on upgrades... see:  http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

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: 643
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17343
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79590