diff --git a/includes/extra-user-fields.php b/includes/extra-user-fields.php index f1e0ed8..833736d 100644 --- a/includes/extra-user-fields.php +++ b/includes/extra-user-fields.php @@ -47,7 +47,7 @@ function extra_user_profile_fields( $user ) { ?> $profile_img_url = esc_attr( get_the_author_meta( 'profile-img-url', $user->ID ) ); if ( empty( $profile_img_url )){ - $profile_img_url = get_avatar_url($author_id); + $profile_img_url = get_avatar_url($user->ID); } ?> diff --git a/template-team-page.php b/template-team-page.php index 688817e..fb6f23e 100644 --- a/template-team-page.php +++ b/template-team-page.php @@ -149,17 +149,19 @@ $full_name = "{$first_name} {$last_name}"; } + $profile_img_url = esc_attr( get_the_author_meta( 'profile-img-url', $author_id ) ); + + if ( empty( $profile_img_url )){ + $profile_img_url = get_avatar_url($author_id); + } + $website_url = esc_attr( get_the_author_meta( 'user_url', $author_id ) ); $twitter_handle = str_replace('@', '', esc_attr( get_the_author_meta( 'twitter-handle', $author_id ) ) ); - - ?> -
- <?php echo $full_name; ?> + <?php echo $full_name; ?> -