RSS to Email – Feed ordering

Home Forums Calendar Products Events Calendar PRO RSS to Email – Feed ordering

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #161163
    webster
    Participant

    Hi, I’m back again after some tooling with RSS and Mailchimp – RSS to email:
    While I was hoping for a simple solution to get Jetpack subscriptions working with the events calendar:

    Jetpack Subscriptions

    I’ve taken your advice and looked into RSS to email. Mailchimp is set up, but it’s not posting the recent events… so back to EC…

    If I grab the feed from /events-slug/feed/
    It looks like the order is ‘upcoming events’.

    After adding the code in this link, so I may add events to my main feed,
    It’s order is ? who knows? how it’s getting that!?
    https://theeventscalendar.com/how-to-add-events-to-your-rss-feed/

    Is there a modification that will allow my to make my events feed in the order of – what’s new or recent posts?

    I’d like it when someone adds a event to the site
    to tell Mailchimp via RSS, but my RSS feed order is whack.

    #161190
    webster
    Participant
    #161210
    webster
    Participant
    #162373
    Barry
    Member

    The RSS feed order will be by publication date (ordered newest to oldest), I believe. Is that not what you’re seeing / in what way is it whack?

    #162411
    webster
    Participant

    Hi there Barry,
    Thanks for your reply!

    That’s exactly what I’m looking for, however, that’s not what I’m getting.
    My home page has the ‘Hot off the press’ list in the sidebar, by publication date:

    Welcome

    My feed however seems to be neither by post date, or any other discernible order. I just visited ‘Events’ the list ( in wp-admin edit.php?post_type=tribe_events). It appears there as the feed does. I thought at first it was reverse order of publication, but there are also published dates out of line with that theory further down the list.
    Puzzling!!

    http://cobworkshops.org/feed
    Ex feed: http://rss.atimofeev.com/read.php?url=http%3A%2F%2Fcobworkshops.org%2Ffeed

    I want to stop short of hacking the wp feed files if I can, cuz god knows I don’t want to replace that every update, that’s not sustainable.
    Perhaps there’s a hook or function that can tell the feed how-to behave… I wish I were a php ninja!

    #162448
    webster
    Participant

    https://theeventscalendar.com/how-to-add-events-to-your-rss-feed/
    If I were a php ninja I would try to tell the $args what to do, but my testing hasn’t been successful yet…

    $args = array(
    ‘orderby’ => ‘post_date’,
    ‘order’ => ‘DESC’,

    #163515
    Barry
    Member

    I do apologize, you’re absolutely right – events are ordered according to event date (which is by design). Possibly though, for feeds only, you could avoid this with a further snippet:

    add_action( 'pre_get_posts', 'maybe_teardown_tribe_order_filter', 60 );
    
    function maybe_teardown_tribe_order_filter() {
    	if ( is_feed() ) remove_filter( 'posts_orderby', array( 'TribeEventsQuery', 'posts_orderby' ), 10, 2 );
    }

    Does that help?

    #163548
    webster
    Participant

    By golly Barry, you made my week!
    Yes it does help. The RSS order is by publish date now.
    Now let’s see what MailChimp RSS-to-email does with this…

    If anyone want’s the code to add events to the main RSS feed (by publish date) see this compiled snippet:
    http://pastie.org/9182085

    I request this page be updated to explain order as is and give the code option above: https://theeventscalendar.com/how-to-add-events-to-your-rss-feed/

    Thank you very much Barry. I hope the universe smiles on you a lil extra this week 🙂

    #163563
    webster
    Participant

    Resolved.

    #163657
    Barry
    Member

    Awesome, thanks for confirming and I’m glad that all worked out 🙂

    I’ll go ahead and close this thread (and we’ll get that tutorial updated). Last but by no means least, if you happened to have a moment and wished to post a review of The Events Calendar we’d love to hear your thoughts. Thanks again!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘RSS to Email – Feed ordering’ is closed to new replies.