Is it possible to display past events on the user's list of events?

Home Forums Calendar Products Community Events Is it possible to display past events on the user's list of events?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #250533
    integrity
    Participant

    The default behavior is to just display future events but I was wondering if it is possible to display past events that the user has created on the user’s Community Events list page?

    #253188
    Barry
    Member

    Hi – great question!

    The query arguments used to build that list are filterable via the tribe_ce_my_events_query hook – so something like this (which you could add to your theme’s functions.php file) should work:

    add_filter( 'tribe_ce_my_events_query', 'alter_community_my_events_list' );
    
    function alter_community_my_events_list( $args ) {
        $args['eventDisplay'] = 'custom';
        $args['start_date'] = '2000-01-01';
        $args['end_date'] = '2100-01-01';
        return $args;
    }

    Does that help?

    #262494
    integrity
    Participant

    Is it possible to have a separate page with just past events? Something like ‘/events/community/past/’?

    If not, what would be the best way to visually display them in a separate list?

    #262930
    Barry
    Member

    That’s really the sort of custom dev question we need to leave to you to solve 🙂

    All sorts of things are possible, even if they are not facilitated “out of the box” – and though we are always open to new feature requests if you need to push ahead with something like this in the short term it’s really something you’d need to work through on your own (albeit, if you have any further specific questions and we can push you in the right direction we’ll be happy to do so).

    #472237
    integrity
    Participant

    Is there a tutorial somewhere on registering a new template and a new URL endpoint?

    #476804
    Barry
    Member

    None that are specific to our suite of plugins, that I know of, but there should be a number of resources on the wider web relating to registering routes/endpoints on one hand and hooking in new templates.

    Really though that’s a matter of general WP development – and is sufficiently advanced that it’s not something we can assist with here, I’m afraid.

    With that in mind I’ll go ahead and close this thread, but I do wish you luck and if any other questions crop up along the way certainly feel free to create new threads to ask us about them and if we can point you in the right direction we will 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Is it possible to display past events on the user's list of events?’ is closed to new replies.