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.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
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).