List Upcoming and Past Events at /events

Home Forums Calendar Products Events Calendar PRO List Upcoming and Past Events at /events

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #940685
    Abrams
    Participant

    Hello,
    Is there an option, or easy way, to have all events (past and future) together in default list? Basically, just like a standard WordPress post list ordered by event date.

    I tried this:

    and a few other approaches, but could not get it to work.

    Any help would be greatly appreciated. Thank you.

    #940985
    Brian
    Member

    Hi,

    I did not see the coding you place there, could repost it?

    We have the tribe_get_events function.

    With a guide here:

    Using tribe_get_events

    Is that what you are looking for?

    #941542
    Abrams
    Participant

    Hi,
    Thank you for the response.

    I am trying to display all events (past/future) in the same list. I have tried the following examples, and a few others, but am unable to get results. I forgot to add I am using the filter bar as well.

    Tried this and variations of it, but it breaks/returns a page not found/404 for the single-event page.
    https://wordpress.org/support/topic/event-calendar-past-events-in-list-template

    // Set the default date for views like List and Month
    add_action( 'parse_query', 'tribe_set_default_date' );
    function tribe_set_default_date () {
    	if ( !is_single() && empty( $_REQUEST['tribe-bar-date'] ) ) {
    		$_REQUEST['tribe-bar-date'] = '2000-01-01';
    	}
    }
    

    Mtbhomer had the same issue with it breaking the single events page and came up with his own approach, but this will not work with the filter bar.

    // Set the default date for views like List and Month
    add_action( 'parse_query', 'tribe_set_default_date' );
    
    function tribe_set_default_date () {
    	if ((get_query_var("eventDisplay") == "default") && empty( $_REQUEST['tribe-bar-date'] ) ) {
    		$_REQUEST['tribe-bar-date'] = '2000-01-01';
    	}
    }

    Any guidance or solution would be greatly appreciated. Thank you.

    #941546
    Abrams
    Participant

    I also found an issue with the search field unable to find past events. The only way it does is using the first ‘tribe_set_default_date’ action listed above. I have tested this on a custom theme and also WP 2011 theme with all plugins disabled.

    Example: Event has the word “Blue” in the title and using “blue” in the search field produces “no results found”. The only way it works is using the first ‘first tribe_set_default_date’ action listed above. By default, the search field should pull up past and future events correct?

    Also by default, even if I select the previous events link, and then search, it still says no results found.

    #941600
    Brian
    Member

    The whole system is design to show current and future events so adding past events into the mix for everything is going to be a challenge. We do that because if we always queried all the events it would greatly impact performance and as an Event Calendar it is used to display events people can attend so finding current and future events is the goal. That is why the search function only finds future events that is intended.

    We do not have coding to give you to change this around it could be possible, but not something I or our developers have done as it is not how the plugin is built. So unfortunately, we do not have any help to change both plugins to achieve this.

    You maybe to use the Event Rocket as it has Event list that could help you list events from whatever date you like.

    Event Rocket

    Otherwise there is not much else we can do on this customization.

    #949665
    Brian
    Member

    I am going to close this topic as we typically close threads if there is no activity after two weeks. Feel free to create a new thread and reference this one to save you time.

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘List Upcoming and Past Events at /events’ is closed to new replies.