Wordpressで投稿者を非表示にしたい
例えば複数人で管理していてそれぞれ別アカウントで管理してるけどそれぞれの名前がRSSに出ちゃう!
とても困る!
みたいな事があった。
しかしRSSFeedもatomやらrss2やら色々あって全部書き換えるのは大変!
というような状況に陥ったので、いっそ元凶のthe_authorを潰すようなコードで対処した
wp-incluide/author-template.php
function the_author( $deprecated = '', $deprecated_echo = true ) { return ""; // 追加行。 if ( !empty( $deprecated ) ) _deprecated_argument( __FUNCTION__, '2.1' ); if ( $deprecated_echo !== true ) _deprecated_argument( __FUNCTION__, '1.5', __('Use <code>get_the_author()</code> instead if you do not want the value echoed.') ); if ( $deprecated_echo ) echo get_the_author(); return get_the_author(); }
荒々しい。なんかいいプラグインとか無いんだろうか。