Only the upcoming events lists offer the ability to use the whole variety of ‘month+n’ options. The main calendar only supports showing the next month.
You can use date filters to pass custom dates into a calendar, that will alter what’s being shown – see the documentation here: https://www.joedolson.com/docs/mc_filter_date_parameter/
Thanks for the clarification on the “month+n”. So could I incorporate the date filtering into a shortcode? I am a little confused on how to do that. I am using the “mini” format to display each month (ex: [my_calendar format=”mini” time=”month”]).
There would be a couple different steps; you’d need to create a custom function to be attached to the year and month filters and add a unique ID to each shortcode, that you could use to pinpoint which month that calendar should show.
e.g.
add_filter( 'mc_filter_month', 'my_custom_month' );
function my_custom_year( $month, $args ) {
if ( $args['id'] == 'june-calendar' ) {
return '6';
}
return $month;
}
You’d want a number of cases for each situation, etc.
Thanks for the explanation.
I got the specific month calendars working with the following code in my theme’s function.php file in case anyone else needs this functionality:
add_filter( 'mc_filter_month', 'my_custom_month', 10, 2 );
function my_custom_month( $month, $args ) {
if ( $args['id'] == 'august-calendar' ) {
$month = '08';
}
elseif ( $args['id'] == 'september-calendar' ) {
$month = '09';
}
// etc...
return $month;
}
Thanks again!