Home › Forums › Calendar Products › Events Calendar PRO › List Upcoming and Past Events at /events
- This topic has 5 replies, 2 voices, and was last updated 11 years, 1 month ago by
Brian.
-
AuthorPosts
-
February 6, 2015 at 9:52 pm #940685
Abrams
ParticipantFebruary 9, 2015 at 8:59 am #940985Brian
MemberHi,
I did not see the coding you place there, could repost it?
We have the tribe_get_events function.
With a guide here:
Is that what you are looking for?
February 10, 2015 at 9:15 pm #941542Abrams
ParticipantHi,
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.
February 10, 2015 at 10:35 pm #941546Abrams
ParticipantI 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.
February 11, 2015 at 7:27 am #941600Brian
MemberThe 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.
Otherwise there is not much else we can do on this customization.
March 20, 2015 at 6:30 am #949665Brian
MemberI 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
-
AuthorPosts
- The topic ‘List Upcoming and Past Events at /events’ is closed to new replies.
