Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active November 22, 2016 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/18dc736a58c2f95ca1858293cfea7e6e to your computer and use it in GitHub Desktop.
Save joshfeck/18dc736a58c2f95ca1858293cfea7e6e to your computer and use it in GitHub Desktop.
Change the EE3 calendar start date. You can add the above to a custom functions plugin or into your WordPress theme's functions.php file. http://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function eecal_custom_start_month(){
wp_add_inline_script(
'espresso_calendar',
'jQuery( document ).ready(function($) {
$("#espresso_calendar").fullCalendar( "gotoDate", 2017, 0, 1);
} );'
);
}
add_action( 'wp_enqueue_scripts', 'eecal_custom_start_month', 11 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment