My template not work for author name on author archive. I tried change to get_the_author but nothing changed. Hope someone help me out. Thank in advance.
I don't know what are you trying to do with if-else statement, but to display author name with their published post link use this code:
<span>Article posted by <?php the_author_posts_link(); ?></span>
Tweak it according to your need. One more thing: You need to call the_author_posts_link() function within the while loop (Yes, the same while loop, which is used to print the_title and the_content).