Order of events

Home Forums Calendar Products Events Calendar PRO Order of events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1012309
    Daniele
    Participant

    Hello, as you can see in this page:
    i want to change order of my event from ASC to DESC.
    ex now is :
    OCTOBER
    NOVEMBER
    DECEMBER

    but i want:
    DECEMBER
    NOVEMBRE
    OCTOBER
    ..

    How can i do it?
    Thank you very much

    #1012491
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can try to help out here, but it is not possible to reorder all the events this way in one of our views.

    Using this snippet in your theme’s functions.php it will reorder the events on the page:

    // Changes past event views to reverse chronological order
    function tribe_future_reverse_chronological ($post_object) {
    $list_ajax = (defined( 'DOING_AJAX' ) && DOING_AJAX && $_REQUEST['tribe_event_display'] === 'list') ? true : false;
    if(tribe_is_upcoming() || $list_ajax) {
    $post_object = array_reverse($post_object);
    }
    return $post_object;
    }
    add_filter('the_posts', 'tribe_future_reverse_chronological', 100);

    The only way to do a complete custom order as you like would be to use tribe_get_events to create a custom loop:

    Using tribe_get_events

    I can try to get you get started on something like that, but for the most part it is beyond the support we can provide.

    Let me know if you have any follow up questions.

    Thanks

    #1012601
    Daniele
    Participant

    i try do edit functions.php but seem that editing isn’t save…i try to do it too much time and seem doesn’t save the snippet..

    #1012634
    Brian
    Member

    Hi,

    I am sorry about the issues with saving to the file.

    Can you try editing the file by ftp instead or through a text editor?

    Beyond that you might have to contact your host for help as we are unable to troubleshoot server issues.

    Thanks

    #1017239
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Order of events’ is closed to new replies.