• Resolved theupperroomnl

    (@theupperroomnl)


    Hi,i would like to show only the upcoming 12 months in the calendar.
    So is it possible to dont show previous months at all?

    And also that 1st of june 2022 is the maximum month that you can see?
    I would like to disable going all the way to 2023. Thank you!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Roland Murg

    (@murgroland)

    Hey @theupperroomnl,

    If you are using the overview calendar, you can only show one month at a time. With the regular calendar display, you have a setting when embedding the calendar for how many months to display, you could set this to 12.

    The date selection dropdown is dynamic, it always shows 12 months in the future. If you were to change to January 2022, it would show another 12 months. You can change the number of months shown in the dropdown by adding this code snippet in your theme’s functions.php file.

    
    add_filter('wpsbc_calendar_overview_output_month_selector_months_after', function(){
        return 24;
    });
    

    You can edit the functions.php file in WP Admin -> Appearance -> Theme Editor -> Theme Functions.

    You can also change the 24 in the code above to the number of future months you want to display.

    Thread Starter theupperroomnl

    (@theupperroomnl)

    Hi Roland, thank you very much. This code works nice.
    About the previous months: now i also see May, April and March.. anyway to not show these previous months? Thank you!

    Plugin Author Roland Murg

    (@murgroland)

    Try adding this in your functions.php file as well:

    
    add_filter('wpsbc_calendar_overview_output_month_selector_hide_past_months', function(){
        return false;
    });
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show upcoming 12 months’ is closed to new replies.