Show the publicaton date as the pubDate in the events RSS feed

Description

The Events Calendar provides and RSS feed for the events. By default the pubDate value is changed to the event start date, so the events show up at the time when they happen and not when they were created.

However, this can be changed back to the original publication date (the date when the event was published on the website) with the following snippet.

Usage

Copy the below code into your (child) theme's functions.php file (or wherever you usually put custom code).

Plugins

The Events Calendar

Snippet

remove_filter( 'get_post_time', array( 'Tribe__Events__Templates', 'event_date_to_pubDate', 10) );

Notes

  • Originally written in January 2018
  • Tested with The Events Calendar 4.6.9
  • Author: AndrĂ¡s Guseo

Disclaimer

As with all of our recipes, please note that we share this in the hope it will be useful but without any guarantees or commitments. If you wish to use it, it is your responsibility to test it first of all and adapt it to your needs (or find someone who can do so on your behalf). We are unable to provide further support in relation to this recipe.