Custom RSS Feed |

I’ve had a custom feed for years. For some reason it has started to throw errors this week. Please note that the whole reason I have it is because my website puts out a podcast 3 times a day – Morning, Mid-day, and Evening. In order for people on the other side of the world to be able to have access to my podcast, I have to post a day in advance. But since most of my users are in the US and Canada, I have my RSS feed release the podcast a day late. So you will see in the code below that there is a function to delay the posting. It has been working fine.

But now my feed won’t even show up in order to validate it.

 * RSS2 Feed Template for displaying RSS2 Posts feed.
 * @package WordPress
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
$more = 1;

echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>

<rss version="2.0"
	<?php do_action('rss2_ns'); ?>

	<title>Audio Daily Office @ The Trinity Mission</title>
	<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
	<link><?php bloginfo_rss('url') ?></link>
	<description>Following in the ancient way of Christian formation, join us each day for Prayer: Morning, Mid-Day, and Evening.</description>
	<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
	<language><?php bloginfo_rss( 'language' ); ?></language>
	<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
	<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
	<itunes:summary>Following in the ancient way of Christian formation, join us each day for Prayer: Morning, Mid-Day, and Evening.</itunes:summary>
	<itunes:author>The Trinity Mission</itunes:author>
	<itunes:image href="" />
	<itunes:name>The Trinity Mission</itunes:name>
	<managingEditor> (The Trinity Mission)</managingEditor>
	<copyright>Copyright © The Trinity Mission 2012-2020</copyright>
	<itunes:subtitle>Morning, Mid-Day, & Evening Prayer</itunes:subtitle>
	<title>Audio Daily Office | The Trinity Mission</title>
	<itunes:category text="Religion & Spirituality">
	<itunes:category text="Christianity" />
	$now_time = time();
	while( have_posts()) : the_post();
		if (get_active_post_time(get_the_ID()) <= $now_time):
		<title><?php the_title_rss() ?></title>
		<link><?php the_permalink_rss() ?></link>
		<comments><?php comments_link_feed(); ?></comments>
		<pubDate><?php //echo localtime_feed_pub_time( get_the_ID() ); 
		//echo get_post_time('D, d M Y H:i:s O', true);
		echo date('D, d M Y H:i:s O', get_active_post_time(get_the_ID()));
		<dc:creator><?php the_author() ?></dc:creator>
		<?php the_category_rss('rss2') ?>

		<guid isPermaLink="false"><?php the_guid(); ?></guid>
<?php $description = "This podcast is supported by a handful of faithful listeners. For more information, please visit"?>
<?php if (get_option('rss_use_excerpt')) : ?>
		<description><![CDATA[<?php echo $description; ?>]]></description>
<?php else : ?>
		<description><![CDATA[<?php echo $description; ?>]]></description>
	<?php $content = $description; ?>
	<?php if ( strlen( $content ) > 0 ) : ?>
		<content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
	<?php else : ?>
		<content:encoded><![CDATA[<?php echo $description; ?>]]></content:encoded>
	<?php endif; ?>
<?php endif; ?>
		<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 rss_enclosure(); ?>
	<?php do_action('rss2_item'); ?>
	<?php endif; //if it is active ?>
	<?php endwhile; ?>

The page I need help with: [log in to see the link]

Source link