Title: Event date field
Last modified: April 14, 2021

---

# Event date field

 *  Resolved [aggk](https://wordpress.org/support/users/aggk/)
 * (@aggk)
 * [5 years ago](https://wordpress.org/support/topic/event-date-field/)
 * Hi,
 * I’m trying a feed generated from Events Calendar for GeoDirectory where there
   are fields for event start/end date/time. These fields did not appear when I 
   tried Super RSS Reader. Is it possible, either with free or pro version to display
   them?
    Here is what the format for these looks like inside the feed items: <ev:
   gd_event_meta xmlns:ev=”Event”><ev:startdate>Mon, 19 Apr 2021 08:00:00 +0000</
   ev:startdate><ev:enddate>Mon, 19 Apr 2021 16:00:00 +0000</ev:enddate></ev:gd_event_meta
   >
 * …everything else worked great!
 * Thanks!

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

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [5 years ago](https://wordpress.org/support/topic/event-date-field/#post-14324394)
 * Hi [@aggk](https://wordpress.org/support/users/aggk/),
 * Thanks for using Super RSS Reader.
 * Right now super rss reader does not recognize metadata like above.
 * But by using plugin hooks, we should be able to fetch them.
    [https://www.aakashweb.com/docs/super-rss-reader/actions-filters/](https://www.aakashweb.com/docs/super-rss-reader/actions-filters/)
 * Can you please share the RSS feed you are using ?
    Let me see if I can share 
   the code for you.
 * Thanks,
    Aakash
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [5 years ago](https://wordpress.org/support/topic/event-date-field/#post-14328957)
 * Please paste below code in function.php and enable “Show date” in feed settings.
   This will work for both free and PRO.
 * It uses Super RSS Reader’s hook to fetch and insert custom data from feed.
    [https://www.aakashweb.com/docs/super-rss-reader/actions-filters/](https://www.aakashweb.com/docs/super-rss-reader/actions-filters/)
 *     ```
       add_filter( 'srr_mod_item_html', 'srr_show_event_time', 10, 3 );
   
       function srr_show_event_time($data, $feed_url, $item){
   
           $event = $item->get_item_tags( 'Event', 'gd_event_meta' );
   
           if( empty( $event ) ){
               return $data;
           }
   
           $start_date = date_i18n( 'Y/m/d g:i A', SimplePie_Misc::parse_date( $event[0]['child']['Event']['startdate'][0]['data'] ) );
           $end_date = date_i18n( 'Y/m/d g:i A', SimplePie_Misc::parse_date( $event[0]['child']['Event']['enddate'][0]['data'] ) );
   
           $data['meta'] = $start_date . ' - ' . $end_date;
   
           return $data;
   
       }
       ```
   
 * Thanks,
    Aakash
 *  Thread Starter [aggk](https://wordpress.org/support/users/aggk/)
 * (@aggk)
 * [5 years ago](https://wordpress.org/support/topic/event-date-field/#post-14330693)
 * Thank you so much!
 * Retrieving the event dates works great, however I discovered that the “Show Author”
   option no longer has effect when that snippet is in place?
 * Thanks!
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [5 years ago](https://wordpress.org/support/topic/event-date-field/#post-14330923)
 * Please try updated code below. You might have to do the following.
 * 1) Replace `<the_feed_url>` with the feed URL you are using. This would prevent
   the hook being applied to all super RSS reader feeds.
    2) Disable “show date”
   in widget options.
 * You can edit the 3rd last line to format the output as you need.
 *     ```
       add_filter( 'srr_mod_item_html', 'srr_show_event_time', 10, 3 );
   
       function srr_show_event_time($data, $feed_url, $item){
   
           if( $feed_url != '<the_feed_url>' ){
               return $data;
           }
   
           $event = $item->get_item_tags( 'Event', 'gd_event_meta' );
   
           if( empty( $event ) ){
               return $data;
           }
   
           $start_date = date_i18n( 'Y/m/d g:i A', SimplePie_Misc::parse_date( $event[0]['child']['Event']['startdate'][0]['data'] ) );
           $end_date = date_i18n( 'Y/m/d g:i A', SimplePie_Misc::parse_date( $event[0]['child']['Event']['enddate'][0]['data'] ) );
   
           $data['meta'] = '<span class="srr-date">' . $start_date . ' - ' . $end_date . '</span>' . $data['meta'];
   
           return $data;
   
       }
       ```
   
 * Thanks,
    Aakash
 *  Thread Starter [aggk](https://wordpress.org/support/users/aggk/)
 * (@aggk)
 * [5 years ago](https://wordpress.org/support/topic/event-date-field/#post-14331068)
 * Perfect, thank you!
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [5 years ago](https://wordpress.org/support/topic/event-date-field/#post-14331081)
 * Cheers !
 *  Thread Starter [aggk](https://wordpress.org/support/users/aggk/)
 * (@aggk)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/event-date-field/#post-14750711)
 * Hi again,
 * From what I understand an RSS feed should deliver date/time in GMT/UTC timezone
   and the “extractor” need to convert to it’s timezone?
 * Now I’m retrieving a feed here that comes with GMT/UTC however I need to display
   with Stockholm timezone (which is set in WordPress settings) could the code above
   take this into account so that dates are displayed in Stockholm timezone? (right
   now I believe it displays the GMT/UTC that the RSS feed deliver)
 * Thanks!
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/event-date-field/#post-14751419)
 * Hi [@aggk](https://wordpress.org/support/users/aggk/),
 * I’ll check and get back to you.
 * Thanks
 *  Thread Starter [aggk](https://wordpress.org/support/users/aggk/)
 * (@aggk)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/event-date-field/#post-14777755)
 * Hi,
 * I just wanted to follow up if you had a chance to look into this?
 * Thanks!
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/event-date-field/#post-14778389)
 * Hi [@aggk](https://wordpress.org/support/users/aggk/),
 * Sorry I missed this out. I’ll get back to you by tomorrow.
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/event-date-field/#post-14781348)
 * Hi [@aggk](https://wordpress.org/support/users/aggk/),
 * Please replace
 *     ```
           $start_date = date_i18n( 'Y/m/d g:i A', SimplePie_Misc::parse_date( $event[0]['child']['Event']['startdate'][0]['data'] ) );
           $end_date = date_i18n( 'Y/m/d g:i A', SimplePie_Misc::parse_date( $event[0]['child']['Event']['enddate'][0]['data'] ) );
       ```
   
 * with this
 *     ```
           $start_date = get_date_from_gmt( date_i18n( 'Y-m-d H:i:s', SimplePie_Misc::parse_date( $event[0]['child']['Event']['startdate'][0]['data'] ) ), 'Y/m/d g:i A' );
           $end_date = get_date_from_gmt( date_i18n( 'Y-m-d H:i:s', SimplePie_Misc::parse_date( $event[0]['child']['Event']['enddate'][0]['data'] ) ), 'Y/m/d g:i A' );
       ```
   
 * I didn’t try the code but I hope it should work.
    let me know how it goes.
 * Thanks,
    Aakash

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

The topic ‘Event date field’ is closed to new replies.

 * ![](https://ps.w.org/super-rss-reader/assets/icon-256x256.png?rev=1749446)
 * [Super RSS Reader - Add attractive RSS Feed Widget](https://wordpress.org/plugins/super-rss-reader/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/super-rss-reader/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/super-rss-reader/)
 * [Active Topics](https://wordpress.org/support/plugin/super-rss-reader/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/super-rss-reader/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/super-rss-reader/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [vaakash](https://wordpress.org/support/users/vaakash/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/event-date-field/#post-14781348)
 * Status: resolved