https://developer.wordpress.org/refe...nt_user_posts/

$the_user = get_user_by('login', 'KULLANICI_ADI_DOLAYISIYLA_GET_PARAMETRESI');
$userID = $the_user->ID;
$user_post_count = count_user_posts( $userID );
Bundan sonrasi zaten if/else