WordPress.org

Ready to get started?Download WordPress

Forums

Roles in content (1 post)

  1. abhud
    Member
    Posted 1 year ago #

    hi, I need to get Role A user content. If the dam code into footer.php works, but if you do content also, so no.

    This code is:

    $user = new WP_User( $user_ID );
    if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
        foreach ( $user->roles as $role )
    echo .$role;}

    I have plugin Exec-PHP.

    thanks

    Marian

Topic Closed

This topic has been closed to new replies.

About this Topic