2

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.

3

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');
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.