>
<channel>
- <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
+ <title><?php wp_title_rss(); ?></title>
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
<link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss("description") ?></description>
- <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
+ <lastBuildDate><?php
+ $date = get_lastpostmodified( 'GMT' );
+ echo $date ? mysql2date( 'D, d M Y H:i:s +0000', $date, false ) : date( 'D, d M Y H:i:s +0000' );
+ ?></lastBuildDate>
<language><?php bloginfo_rss( 'language' ); ?></language>
<sy:updatePeriod><?php
$duration = 'hourly';
/**
- * Filter how often to update the RSS feed.
+ * Filters how often to update the RSS feed.
*
* @since 2.1.0
*
$frequency = '1';
/**
- * Filter the RSS update frequency.
+ * Filters the RSS update frequency.
*
* @since 2.1.0
*
<item>
<title><?php the_title_rss() ?></title>
<link><?php the_permalink_rss() ?></link>
+<?php if ( get_comments_number() || comments_open() ) : ?>
<comments><?php comments_link_feed(); ?></comments>
+<?php endif; ?>
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
<dc:creator><![CDATA[<?php the_author() ?>]]></dc:creator>
<?php the_category_rss('rss2') ?>
<content:encoded><![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>
<?php endif; ?>
<?php endif; ?>
+<?php if ( get_comments_number() || comments_open() ) : ?>
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
<slash:comments><?php echo get_comments_number(); ?></slash:comments>
+<?php endif; ?>
<?php rss_enclosure(); ?>
<?php
/**