My theme (Avada) translates the function the_author_posts_link
to add “By ” before the author’s name (see their code below). I don't want “By ” before the author’s name. How can I override this without messing with the php file where this is given in the theme?
if ( $settings['post_meta_author'] ) {
ob_start();
the_author_posts_link();
$author_post_link = ob_get_clean();
// Check if rich snippets are enabled.
if ( fusion_library()->get_option( 'disable_date_rich_snippet_pages' ) && fusion_library()->get_option( 'disable_rich_snippet_author' ) ) {
/* translators: The author. */
$metadata .= sprintf( esc_html__( 'By %s', 'Avada' ), '<span class="vcard"><span class="fn">' . $author_post_link . '</span></span>' );
} else {
/* translators: The author. */
$metadata .= sprintf( esc_html__( 'By %s', 'Avada' ), '<span>' . $author_post_link . '</span>' );
}
$metadata .= '<span class="fusion-inline-sep">|</span>';
} else { // If author meta data won't be visible, render just the invisible author rich snippet.
$author .= fusion_render_rich_snippets_for_pages( false, true, false );
}