The Events Calendar: Change Events Per Page
Overrides the Events Calendar events-per-page setting via filter so you can control the listing count in code without visiting the plugin settings.
PHPby SnipCraft
php
<?php
if ( ! function_exists( 'scseed_tec_events_per_page' ) ) {
function scseed_tec_events_per_page( $value ) {
if ( ! class_exists( 'Tribe__Events__Main' ) ) {
return $value;
}
// Change 12 to any number you prefer.
return 12;
}
// 'postsPerPage' is the The Events Calendar option name for events per page.
add_filter( 'tribe_get_option_postsPerPage', 'scseed_tec_events_per_page' );
}#events#frontend#pagination#settings#the-events-calendar