Plugin Support
Darian
(@d0153)
Hi @jennyong
Thanks for reaching out.
Combining both upcoming and past events may be possible with some custom coding, but if you decide to give that a try, please note we cannot provide full support for custom implementations like that.
As an alternative, you could try increasing the number of events per page from Events > Settings > Display > Number of events to show per page
And on your past events, you could add the snippet code provided in our article to display the latest to oldest. [Showing Past Events in Reverse Order]
Let me know if you have further questions or concerns.
Hi @d0153
Thanks for your reply.
I might want to try reverse the past events which show from latest to oldest. I already add the code in functions.php but it still not working. Any advice?
Thank you
Plugin Support
Darian
(@d0153)
Hi @jennyong
That’s weird. I tried the first code snippet from this article and it’s working as expected.
Could you try removing the code from your functions.php and add them through Code Snippets plugin, and see if that helps?
Again, you’ll need to use this code:
/**
* Changes Past Event Reverse Chronological Order
*
* @param array $template_vars An array of variables used to display the current view.
*
* @return array Same as above.
*/
function tribe_past_reverse_chronological_v2( $template_vars ) {
if ( ! empty( $template_vars['is_past'] ) ) {
$template_vars['events'] = array_reverse( $template_vars['events'] );
}
return $template_vars;
}
// Change List View to Past Event Reverse Chronological Order
add_filter( 'tribe_events_views_v2_view_list_template_vars', 'tribe_past_reverse_chronological_v2', 100 );
// Change Photo View to Past Event Reverse Chronological Order
add_filter( 'tribe_events_views_v2_view_photo_template_vars', 'tribe_past_reverse_chronological_v2', 100 );
Let me know how it goes.
Hi @d0153
Thanks for your reply.
The code is working now.
Thank you for your support.
Plugin Support
Darian
(@d0153)
Hi @jennyong
Thanks for your confirmation and I’m glad that it is now working.
If you have some time to review, that would be amazing!
https://wordpress.org/support/plugin/the-events-calendar/reviews/
I’d be closing this thread, and please do not hesitate to bump a new thread on our way. This allows us to track topics/issues efficiently and follow the WordPress Forum Guidelines