WordPress filter hook · part of WordPress core
the_author
A WordPress core filter that 16 plugins also fire themselves, running on 238K+ sites between them.
How to use the_author
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'the_author', function( $display_name ) {
// Change $display_name here.
return $display_name;
}, 10, 1 );Argument names come from Blog-in-Blog's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
16 plugins that fire the_author
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Newsletter200,000+ installs
apply_filters( 'the_author', $authordata->display_name )emails/blocks/posts/block.php:253 -
Co-Authors Plus20,000+ installs
apply_filters( 'the_author', $author->display_name )template-tags.php:290 -
Subscribe210,000+ installs
apply_filters( 'the_author', $author->display_name )classes/class-s2-core.php:657 -
PublishPress Planner6,000+ installs
apply_filters( 'the_author', $author_name )common/php/class-module.php:1317 -
Blog-in-Blog800+ installs
apply_filters( 'the_author', $user->display_name )blog-in-blog.php:243 -
Material Design for WordPress700+ installs
apply_filters( 'the_author', get_the_author_meta( 'display_name', $post_card->post_author ) )php/template-parts/blocks/card-query.php:117 -
ShMapper by Teplitsa100+ installs
apply_filters( 'the_author', $authordata->display_name )class/SMC_Post.php:151 -
Live Blogging100+ installs
apply_filters( 'the_author', $user->display_name )live-blogging.php:1106 -
Live Blogging Plus50+ installs
apply_filters( 'the_author', $user->display_name )live-blogging-plus.php:1118 -
Author Image(s)50+ installs
apply_filters( 'the_author', $author_name )author-images.php:417 -
BuddyPress Forums Extras10+ installs
apply_filters( 'the_author', get_topic_author( $bb_topic->topic_id ) )feeds/bp-forum-extras-group-forum-feed.php:39 -
Additional Authors10+ installs
apply_filters( 'the_author', is_object( $additional_author_archive_object ) ? $additional_author_archive_object->display_name : '' )public-functions.php:69 -
AWE VideoFewer than 10 installs
apply_filters( 'the_author', is_object($authordata) ? $authordata->display_name : null )class-awe-videos-json.php:148 -
Support PortalFewer than 10 installs
apply_filters( 'the_author', $topic_author_name )templates/topic-single.php:14 -
Arshida Toolkit for WooCommerceFewer than 10 installs
apply_filters( 'the_author', is_object( $userdata ) ? $userdata->display_name : '' )src/Theme/Main.php:1812 -
Media LibrariesFewer than 10 installs
apply_filters( 'the_author', is_object($author) ? $author->display_name : null )review-template.php:119
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.