製品サイトなどに、投稿者情報としてユーザ名が出るのもなぁと思い調査。
Wordpressではテンプレートとされている各ページ(AMP、RSS)の修正点について、下記に整理する。
- WordPress Version: 5.4.2
AMPページの投稿者情報を削除する
wordpress/htdocs/wp-content/plugins/amp/templates/meta-author.php
- chownで編集可権限にしたあと、下記のように該当部分をコメントアウト
meta-author.php
<?php /*if ( $post_author ) : ?>
<div class="amp-wp-meta amp-wp-byline">
<?php if ( function_exists( 'get_avatar_url' ) ) : ?>
<amp-img src="<?php echo esc_url( get_avatar_url( $post_author->user_email, [ 'size' => 24 ] ) ); ?>" alt="<?php echo esc_attr( $post_author->display_name ); ?>" width="24" height="24" layout="fixed"></amp-img>
<?php endif; ?>
<span class="amp-wp-author author vcard"><?php echo esc_html( $post_author->display_name ); ?></span>
</div>
<?php endif;*/ ?>
RSSページの投稿者情報を削除する
wordpress/htdocs/wp-includes/feed-rss2.php
- 下記のように該当部分をコメントアウト
feed-rss2.php
<?php /* <dc:creator><![CDATA[<?php the_author(); ?>]]></dc:creator> */ ?>