Home › Forums › Calendar Products › Events Calendar PRO › I want the actual publication date in RSS, not the event date. How can I revert?
- This topic has 4 replies, 2 voices, and was last updated 9 years, 9 months ago by matthewdenton.
-
AuthorPosts
-
June 27, 2014 at 5:42 pm #256271KevinParticipant
While I realize the need that many have for the WP RSS feed to order events by date, I would like to revert back to how it was in TEC 3.5
I have an RSS feed that powers a daily newsletter through a MailChimp RSS campaign. That campaign determines what items are new and due to be sent on a particular day partly based on <pubdate>.
Before the upgrade, it worked great. MailChimp would only send our 1-2 new events for the day. Now with the new date being the event date, MailChimp keeps resending events in our newsletter
June 30, 2014 at 5:52 pm #263011matthewdentonMemberHi Keven,
Thanks for taking the time to reach out to us. We have a post that our team created on how to modify the rss feeds and I think it will help resolve your problem.
https://theeventscalendar.com/how-to-add-events-to-your-rss-feed/
Please take a look and let me know if it helps you revert to including the publication date. In the mean time I will pull a difference of our 3.5 / 3.6 code and send it your way to further help you out.
– Matthew
July 6, 2014 at 11:00 am #291058KevinParticipantThanks Matthew, but the post you reference appears to be outdated for 3.6.
There is a function in tribe-templates.class.php called event_date_to_pubDate that changes the pubDate in RSS feeds.
I was able to comment out the function. How can I achieve this without modifying my plugin files?
July 7, 2014 at 7:31 am #299775matthewdentonMemberHi Kevin:
Thanks for finding the function responsible for performing the modification. I had a query out to the developer that had made the changes but they’ve been out on vacation. Taking a look at the code we add the function through a filter.
add_filter( ‘get_post_time’, array(__CLASS__, ‘event_date_to_pubDate’), 10 , 3 );
As such you should be able to remove the filter using remove_filter. There are some nuances to removing filters explained in the WordPress Codex that may need to be explored but the call should be similar to:
remove_filter( ‘get_post_time’, array(‘TribeEventsTemplates’, ‘event_date_to_pubDate’), 10 );
You can place this link in your theme’s functions.php file as the theme functions file loads after the plugins.
Please let me know if this works for you.
– MatthewJuly 21, 2014 at 7:31 am #470937matthewdentonMemberHi, I wanted to quickly follow-up with you to see if you are all set. Please let me know if you do have additional questions I can assist with or if I should go ahead and close this thread.
Thank you,
– Matthew
-
AuthorPosts
- The topic ‘I want the actual publication date in RSS, not the event date. How can I revert?’ is closed to new replies.