• Resolved Creatrix

    (@chrisl_57)


    I want to show a list of all the members from a user role I have set up called ‘Corporate’.

    I tried the following but with no joy:

    <?php
                    $blogusers = get_users(
                    'role_select=Corportate'
                    );
                    // Array of WP_User objects.
                    foreach ( $blogusers as $user ) {
                        echo '<p>' . esc_html( $user->user_email ) . '</p>';
                    }
    ?>

    Is this close?

    https://www.ads-software.com/plugins/ultimate-member/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘List members from particaular user role via php’ is closed to new replies.