the_author_posts_link is so handy. But is there now way in WordPress to set/edit the default display name for all new authors? (I know you can manually edit per author). I’d like it to be user_login, and then I can just call the_author_posts_link accordingly.
1 Answer
Try this, it will change display names to logins anywhere in the Loop:
add_filter('the_author', 'return_login');
function return_login($display_name) {
if ( !in_the_loop() )
return $display_name;
return get_the_author_meta('login');
}