• Resolved Alex Coulstring

    (@alexcoulstring)


    <?php $user_info = get_userdata(1);
          echo 'Your current community is:<b> ';
          echo '<br><br><span style="color:#63A132;">' . implode(', ', $user_info->roles) . "\n";
            ?>

    It should be displaying something other than Administrator. I’m logged in as another role.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter Alex Coulstring

    (@alexcoulstring)

    I figured it out for anyone needing help.
    $current_user = wp_get_current_user() at the top instead of $user_info = get_userdata(1)

Viewing 1 replies (of 1 total)
  • The topic ‘Trying to display Role. But its always administrator’ is closed to new replies.