Admin excluded from top users

3.84K viewsIssues
0

Can i include also admin to top users by reputation? I tried to give him additional roles like AnsPress participant and moderator but nothing seems to be solution. In AnsPress settings admin is not excluded. Thanks.

Answered question
0

Hello,
Those are excluded for some reason. If you want admin and moderators in top users, simply copy top_users.php in askbug/includes/widgets to my_top_users.php
Replace all instances of ab_top_users to my_top_users and AB_Top_Users to My_Top_Users.
Now find this line
'role__not_in' => [ 'administrator', 'ap_moderator' ],

and comment it out.
Include this new file in theme functions.php

Answered question
You are viewing 1 out of 1 answers, click here to view all answers.