get the username of a user in his author page

I’ve implemented this code inside my author.php file, in order to display the username of the author: <?php printf( “<h4>The blog of<a href=”” . get_author_posts_url( get_the_author_meta( “ID’ ) ) . “‘ title=”” . esc_attr( get_the_author() ) . “” rel=”me”>” . get_the_author() . “</a></h4>” ); ?> It displays correctly the username of a user who has … Read more

WordPress Author Page

Whenever I click on the Author link, I get redirected to the home page. I’ve set up the author.php page according to the instruction on codex, but still no luck. Does anyone have any other suggestions? 1 Answer 1 Under the plugin’s settings SEO > Indexation, scroll down to Archive Settings and make sure ‘Disable … Read more

Display Author role in archive or author page

I want to display author role on archive and author page outside loop I found this code on stack overflow and it works fine within the loop function get_author_role() { global $authordata; $author_roles = $authordata->roles; $author_role = array_shift($author_roles); return $author_role; } In template using below code echo get_author_role() But when I am adding this to … Read more