get_the_author() function redirects to home page - wordpress

I am trying to launch my own wordpress theme.

It's working fine with minor issue in development stage.

I use <a href="" class="author_name fl_left">' . get_the_author() . '</a> to print the author name link in my posts.

It's printing the proper author name. But when I click it , it redirects to the home page. why?

Is it necessary to create a author.php while we using a word press inbuilt function?

Any help highly appreciated.

Thanks, Riffaz.


It seems that you dont have authors page, then you can link user to authors post page. You can use this instead

<a href="'.the_author_posts_link().'" class="author_name fl_left">' . get_the_author() . '</a>

Need Your Help

Prevent FormsAuthenticationModule of intercepting ASP.NET Web API responses forms-authentication

In ASP.NET the FormsAuthenticationModule intercepts any HTTP 401, and returns an HTTP 302 redirection to the login page. This is a pain for AJAX, since you ask for json and get the login page in ht...