• 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.

    http://wordpress.org/extend/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter lleta

    (@lleta)

    Will the Pro version automatically pull event start and end dates into the feed?

    Any update on this. We are having the same issue and will PAY to have this snippet of code fixed.

    Hi all,

    There is nothing wrong with the snippet of code posted in the tutorial, you just need to place it in functions.php properly. Sometimes there may have been a closing PHP tag before where you paste the code and you would need to re-open PHP in order to get the snippet to work:

    <?php //re-open with this tag

    I hope that helps but let me know if you have any questions.

    Thanks,
    Jonah

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘RSS: No Start and End Dates’ is closed to new replies.