Open fidoboy opened 3 years ago
Right now the function postPrepare in Index.php is making this, and it’s not working fine for me:
$user = get_userdata( $post->post_author ); if ( $user instanceof WP_User ) { $user_data = $user->display_name; } else { $user_data = ''; }
But it can be more simple and less expensive this way;
$user_data = get_the_author_meta(“display_name”, $post->post_author);
Right now the function postPrepare in Index.php is making this, and it’s not working fine for me:
$user = get_userdata( $post->post_author ); if ( $user instanceof WP_User ) { $user_data = $user->display_name; } else { $user_data = ''; }
But it can be more simple and less expensive this way;
$user_data = get_the_author_meta(“display_name”, $post->post_author);