Created
April 19, 2018 19:01
Revisions
-
bekarice created this gist
Apr 19, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ <?php // only copy if needed! /** * Fixes page titles for co-author archives. * * @param string[] $replacement Yoast title settings replacement data * @return string[] updated data */ function br_fix_author_archive_title( $replacement ) { if ( is_author() && isset( $replacement['%%name%%'] ) ) { $replacement['%%name%%'] = get_queried_object()->display_name; } return $replacement; } add_filter( 'wpseo_replacements', 'br_fix_author_archive_title' );