最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Theme translates the_author_posts_link. How can I remove their translation?

programmeradmin4浏览0评论

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 );
        }
发布评论

评论列表(0)

  1. 暂无评论