How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
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>
Assign new post author IF another user in custom field on post transition
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
After digging through many bug reports I found a solution to the issue I was facing. The problem I was having is related to a new feature in 6.0 for sites with over 10K user accounts which automatically disables the author dropdown in Bulk/Quick edit. I’m not sure how they decided that was a good … Read more
i solve this problem by using this code <?php $curauth = (isset($_GET[‘author_name’])) ? get_user_by(‘slug’, $author_name) : get_userdata(intval($author)); ?> <?php the_field(‘grantor_name’, ‘user_’.$curauth->ID)
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
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
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
Retrieving set of posts by some criteria is typically realm of secondary loop. You can use get_posts() template tag or WP_Query object which both support author parameters in arguments: author (numerical ID) author_name.