RSS: No Start and End Dates
-
Hi,
Thanks for your great plugin.
I visited your forum and found this page about adding the start and end event dates in a feed: http://tri.be/how-to-add-events-to-your-rss-feed/. I tried adding the following code that you provided for the functions.php, at the bottom of the page:
// Add Tribe Event Namespace add_filter( 'rss2_ns', 'events_rss2_namespace' ); function events_rss2_namespace() { echo 'xmlns:ev="http://purl.org/rss/2.0/modules/event/"'; } // Add Event Date to RSS Feeds add_action('rss_item','tribe_rss_feed_add_eventdate'); add_action('rss2_item','tribe_rss_feed_add_eventdate'); add_action('commentsrss2_item','tribe_rss_feed_add_eventdate'); function tribe_rss_feed_add_eventdate() { ?> <ev:tribe_event_meta xmlns:ev="Event"> <?php if (tribe_get_start_date() !== tribe_get_end_date() ) { ?> <ev:startdate><?php echo tribe_get_start_date(); ?></ev:startdate> <ev:enddate><?php echo tribe_get_end_date(); ?></ev:enddate> <?php } else { ?> <ev:startdate><?php echo tribe_get_start_date(); ?></ev:startdate> <?php } ?> </ev:tribe_event_meta> <?php }However, I get a parse error on the last line of functions.php. I had to pull this code out immediately via FTP because the whole site was gone. However, here is a link to my feed: http://kellysrestaurant.com/outer-banks-events-entertainment/feed/.
Any help is appreciated. Thank you.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘RSS: No Start and End Dates’ is closed to new replies.