Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,871
- Creating & Extending
- 25,903
- Requests & Feedback
- 9,548
- Third Party Plugins
- 9,832
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,178
-
Try this
<?php
$user_id = bp_loggedin_user_id();
$user = new WP_User( $user_id );
if ( $user->roles[0] != 'administrator' ) {
// your code
}
?>