More of WordPress’s crap

« Programming in D | blog.ariffic | links for 2008-04-17 »

So it turns out that in WordPress (at least the newest version - I don’t know about older versions), by default, you can’t have an RSS feed show full-text - it only shows excerpts. The culprit? This snatch of code from wp-includes/feed-rss2.php:

<?php if (get_option('rss_use_excerpt')) : ?>

  <description><![CDATA[<?php the_excerpt_rss() ?>]]>

<?php else : ?>

  <description><![CDATA[<?php the_excerpt_rss() ?>]]>

Seriously, guys, that’s just sloppy damned coding. I would assume it was on purpose if it weren’t for the fact that in the lines immediately following, which go over the content of the <content:encoded> element, are written correctly. Way to go, WordPress!

Anyone, for anyone wanting full-text RSS feeds, just convert the second call to the_except_rss() to the_content().

Comments are closed.