[wp-hackers] Custom feeds: Full and summary

Roy Schestowitz r at schestowitz.com
Wed Dec 21 10:33:40 GMT 2005


_____/ On Wed 21 Dec 2005 10:05:32 GMT, [Chetan Kunte] wrote : \_____

> Hi -
>
> I'm looking at something like this in theory, when the blog owner
> provides full post in feed by default:
>
> http://somesite.com/?feed=rss2&type=summary
> http://somesite.com/?feed=rss2&type=full
>
> Does such a thing exist natively in WordPress?
> --
> Chetan, ckunte.com


Looking at the latest version,

===
<?php if (get_settings('rss_use_excerpt')) : ?>
		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
<?php else : ?>
		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
	<?php if ( strlen( $post->post_content ) > 0 ) : ?>
		<content:encoded><![CDATA[<?php the_content('', 0, '') 
?>]]></content:encoded>
	<?php else : ?>
		<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
	<?php endif; ?>
<?php endif; ?>
===

You  could change the file and save it as rss-excerpt.php. As far as I can
tell,  you could not (trivially) pass it an argument to bubble through  to
the  conditional statements. It requires changing the interfaces. It would
be  nice, I agree. I have about 5 separate files for feeds, which leads to
fragmentations  and  leaks.  Choice is good nonetheless. 1/3 of  the  sub-
scribers prefer full text and the rest settle for a one-line excerpt.

Best wishes,

Roy



More information about the wp-hackers mailing list