3 * RSS2 Feed Template for displaying RSS2 Posts feed.
8 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
12 <?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
15 xmlns:content="http://purl.org/rss/1.0/modules/content/"
16 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
17 xmlns:dc="http://purl.org/dc/elements/1.1/"
18 xmlns:atom="http://www.w3.org/2005/Atom"
19 <?php do_action('rss2_ns'); ?>
23 <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
24 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
25 <link><?php bloginfo_rss('url') ?></link>
26 <description><?php bloginfo_rss("description") ?></description>
27 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
28 <?php the_generator( 'rss2' ); ?>
29 <language><?php echo get_option('rss_language'); ?></language>
30 <?php do_action('rss2_head'); ?>
31 <?php while( have_posts()) : the_post(); ?>
33 <title><?php the_title_rss() ?></title>
34 <link><?php the_permalink_rss() ?></link>
35 <comments><?php comments_link(); ?></comments>
36 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
37 <dc:creator><?php the_author() ?></dc:creator>
38 <?php the_category_rss() ?>
40 <guid isPermaLink="false"><?php the_guid(); ?></guid>
41 <?php if (get_option('rss_use_excerpt')) : ?>
42 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
44 <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
45 <?php if ( strlen( $post->post_content ) > 0 ) : ?>
46 <content:encoded><![CDATA[<?php the_content() ?>]]></content:encoded>
48 <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
51 <wfw:commentRss><?php echo get_post_comments_feed_link(); ?></wfw:commentRss>
52 <?php rss_enclosure(); ?>
53 <?php do_action('rss2_item'); ?>