the_author function is displaying wrong name and url

Sorry, but I found the answer very quickly myself and I attempted to delete this original question, but I think maybe somebody else may need this answer. This is right code to solve this issue: <h1 class=”page-title”> <?php echo ‘<a href=”‘.get_author_posts_url(get_userdata($posts[0]->post_author)->data->ID).'”>’.get_userdata($posts[0]->post_author)->data->display_name.'</a>’; ?></h1>

How to load locally saved author photos based on author ID

One option is to use the pre_get_avatar filter to return custom avatar HTML, which will short-circuit get_avatar() preventing it from reaching out to Gravatar for the image. For example like this, add_filter(‘pre_get_avatar’, ‘wpse_410434_author_img_html’, 10, 3); function wpse_410434_author_img_html( $avatar, $id_or_email, $args ) { if ( $avatar || ! is_numeric( $id_or_email ) ) { return $avatar; } … Read more

Query parsing only author ids

Assuming that you have an array of post objects in $my_posts… $authids = array_unique(wp_list_pluck($my_posts,’post_author’)); What you will get are the post authors for the current page of posts, not the post authors for all of the posts. If you want the authors for all of the posts you will have run another query. To run … Read more

why is there an author.php

From the Codex: …when a viewer clicks on a link to a post author, by default he or she is taken to a page listing the posts from that particular author in chronological order, from newest posts at the top to oldest at the bottom. In other words, the author template is used to show … Read more

Add author section on Author archive posts

http://wordpress.org/extend/plugins/tags/author http://wordpress.org/extend/plugins/author-info-widget/ http://wordpress.org/extend/plugins/author-bio/ http://wordpress.org/extend/plugins/author-exposed/ Or you can use your own custom solution