Viewing 8 replies - 16 through 23 (of 23 total)
  • Thanks Brook, that’s a great little snippet.
    Perfect for the rolling back in time archives.

    Brook

    (@brook-tribe)

    You are welcome!

    Script works fine, unless you needed to disable the Ajax call – which in my case I had to as the ajax call didn’t work well together with mqtranslate. Therefore I used the following (which seems to work fine in my case)

    // Changes past event views to reverse chronological order
    function tribe_past_reverse_chronological ($post_object) {
    if(tribe_is_past() ) {
    $post_object = array_reverse($post_object);
    }
    return $post_object;
    }
    add_filter('the_posts', 'tribe_past_reverse_chronological', 100);

    Any reasons why there was specific code for Ajax in the original snipet?

    Brook

    (@brook-tribe)

    Good question Tredneb,

    The reason is that for sites with Ajax the script needs to reverse sort order when the page is loaded via Ajax, which actually happens more often than not. Without that code the sort order would not be reversed for ajax loads.

    Thanks for sharing your code. Good for other users in your shoes.

    Cheers!

    – Brook

    Thanks Brook!! Works perfectly!

    -David

    Brook

    (@brook-tribe)

    You’re welcome!

    Hi Brook,
    In your snippet, is there a way to put the Previous Events link at the bottom of the page so that it is on the lower right (not lower left)? It’s more logical for my brain for the Previous Events to be going to the right.

    For example:

    Previous Events >>

    Brook

    (@brook-tribe)

    Howdy BA,

    That’s not possible via a snippet. However it is via a theme override. Have a look at the Themer’s Guide. It walks you through modifying the PHP templates so you change the look, wording, and order of things.

    Cheers!
    – Brook

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Previous Events in Wrong Chronoligical Order’ is closed to new replies.