WordPressのRSSを全文表示にする

WordPressのバージョンアップ時にやり直さなくちゃならないけど…

RSSのテンプレートは /wp-includes/feed-rss2.php なので、これのコピーを取って

 <?php if (get_option(‘rss_use_excerpt’)) : ?>
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
<?php else : ?>
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
<?php $content = get_the_content_feed(‘rss2’); ?>
<?php if ( strlen( $content ) > 0 ) : ?>
<content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
<?php else : ?>
<content:encoded><![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>
<?php endif; ?>
<?php endif; ?>

この部分をまるごと <?php /* ~~~ */ ?>でコメントアウトして、

<?php $content = get_the_content_feed(‘rss2’); ?>
<description><![CDATA[<?php echo preg_replace(“/(\n|\r|\t)/”,””,$content); ?>]]></description>
<content:encoded><![CDATA[<?php echo preg_replace(“/(\n|\r|\t)/”,””,$content); ?>]]></content:encoded>

こうしました。

設定>表示設定の「RSS/Atom フィードでの各投稿の表示」設定は無視されちゃうけど、まぁいいか。