你必须使用the_content
和the_excerpt_rss
挂钩。您可以这样做:
function rss_append_footer($content) {
if(is_feed()) {
$related_posts_html = ... // I assume you already can compute it
$content .= $related_posts_html;
}
return $content;
}
add_filter(\'the_content\', \'rss_append_footer\');
add_filter(\'the_excerpt_rss\', \'rss_append_footer\');