Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // UPDATED SNIPPET FOUND HERE: https://gist.github.com/elimn/d034dfddb9be206d9cc1
- /*
- * Set the default month for the main month calendar view
- */
- add_filter('tribe_get_month_view_date', 'tribe_events_calendar_default_month');
- function tribe_events_calendar_default_month ($month) {
- // Month you want cal to default to, example '10' would be October
- $def_month_num = '10';
- if ( empty( $_REQUEST['tribe-bar-date'] ) ) {
- $month = date('Y') . "-$def_month_num-01";
- }
- return $month;
- }
- /*
- * Set the default month for the mini cal widget
- */
- add_filter('tribe_events_get_mini_calendar_args', 'tribe_events_mini_calendar_def_month');
- function tribe_events_mini_calendar_def_month ($args) {
- // Month you want cal to default to, example '10' would be October
- $month_num = '10';
- $args['eventDate'] = date('Y') . "-$month_num-01 00:00:00";
- return $args;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement