Created
September 23, 2021 21:05
-
-
Save lelandf/762ccc7090801c4fbc2173a876f59cb7 to your computer and use it in GitHub Desktop.
[TEC] increase number of events in events list widget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Use at your own risk! | |
// No warranty, no support provided | |
// There are performance implications of querying more posts than your database server can handle | |
add_filter( 'tribe_widget_args_to_context', function( $alterations, $arguments ) { | |
// Is this the Events List widget? | |
if ( 'tribe-widget-events-list' === $arguments['widget_obj']->id_base ) { | |
// Adjust number of events displayed here. | |
$alterations['events_per_page'] = 99; | |
} | |
return $alterations; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment