<link rel="self" type="application/atom+xml" href="<?php 
    bloginfo_rss('comments_atom_url');
    ?>
" />
	<id><?php 
    bloginfo_rss('comments_atom_url');
    ?>
</id>
<?php 
}
?>

<?php 
if (have_comments()) {
    while (have_comments()) {
        the_comment();
        $comment_post = get_post($comment->comment_post_ID);
        get_post_custom($comment_post->ID);
        ?>
	<entry>
		<title><?php 
        if (!is_singular()) {
            $title = get_the_title($comment_post->ID);
            $title = apply_filters('the_title_rss', $title);
            printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
        } else {
            printf(ent2ncr(__('By: %s')), get_comment_author_rss());
        }
        ?>
</title>
		<link rel="alternate" href="<?php 
Example #2
0
		if ( is_singular() )
			printf(ent2ncr(__('Comments on: %s')), get_the_title_rss());
		elseif ( is_search() )
			printf(ent2ncr(__('Comments for %s searching on %s')), get_bloginfo_rss( 'name' ), esc_attr($wp_query->query_vars['s']));
		else
			printf(ent2ncr(__('Comments for %s')), get_bloginfo_rss( 'name' ) . get_wp_title_rss());
	?></title>
	<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
	<link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link>
	<description><?php bloginfo_rss("description") ?></description>
	<lastBuildDate><?php echo mysql2date('r', get_lastcommentmodified('GMT')); ?></lastBuildDate>
	<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
	<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
	<?php do_action('commentsrss2_head'); ?>
<?php
if ( have_comments() ) : while ( have_comments() ) : the_comment();
	$comment_post = get_post($comment->comment_post_ID);
	get_post_custom($comment_post->ID);
?>
	<item>
		<title><?php
			if ( !is_singular() ) {
				$title = get_the_title($comment_post->ID);
				$title = apply_filters('the_title_rss', $title);
				printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
			} else {
				printf(ent2ncr(__('By: %s')), get_comment_author_rss());
			}
		?></title>
		<link><?php comment_link() ?></link>
		<dc:creator><?php echo get_comment_author_rss() ?></dc:creator>