Support

Account

Home Forums General Issues AWESUM! Reply To: AWESUM!

  • Etic your code did not work. It was still not outputting the expiration date when Credentials was set to expired.

    As I mentioned I’m barely a novice at PHP. After some hours using Google I was able to modify what you gave me into this, and it appears to work:

    <?php
                $args = array(
                    'orderby'=>'nicename',
                    'role'=>'instructor'
                );
    
                $users = get_users( $args );
    
                foreach ( $users as $user ) {
                    print($user->display_name);
                    the_field('credentials', 'user_'.$user->ID);
                    if (get_field('credentials', 'user_'.$user->ID) == 'expired')
                    the_field('credentials_expired_date', 'user_'.$user->ID);
                    the_field('background_check_status', 'user_'.$user->ID);
                    echo '<br/>';
                }
                ?>

    As I add more fields using ACF I’d like to copy/paste/modify so as to output those fields too. But because it appears different than what you suggested, could you confirm this is correct coding?

    My page output now for Credentials current & Background expired is (still needs CSS):

    Lisa RhodescurrentExpired

    Output for Credentials expired & Background current:

    Timmy Biggsexpired20130802Current