No giving Rep.Point for admin user
I’m happy to be using AnsPress and your Askbug theme.
Can I avoid to give point (disable point) to admin user when admin do any acttions?
I hope to give point only non-admin user.
Thanks in advance.
Rahul Aryan selected answer
Add this snippet to theme functions.php:
add_filter( 'ap_reputation', 'my_function_to_disable_admin_reputation', 10, 3 ); function my_function_to_disable_admin_reputation( $reputation, $type, $user_id ) { if( is_super_admin( $user_id ) || user_can( $user_id, 'manage_options' ) ) { return 0; } return $reputation; }
Rahul Aryan commented on answer
Rahul Aryan commented
Please tell me what error is shown. Check error log for more detail.
QA in Japan (Buyer) commented
Many sorry Rahul!!
I try it again and it works well.
Sorry again…
Rahul Aryan commented
No problem. Thanks for letting me know.
Thanks for your help.
I copy and paste it end of functions.php, (after //require get_template_directory() . ‘/includes/admin/auto-installer.php’;)
but shows 505 error.
Is there wrong way?