Ajaxify calendar
Write your required javascript, then use this code to display it on the page, it ensures that the script is only included if the calendar is displayed add_filter(‘get_calendar’, ‘add_calendar_scripts’); function add_calendar_scripts($content) { add_action( ‘wp_footer’, ‘output_calendar_scripts’, 11); return $content; } function output_calendar_scripts() { ?> <script type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/70078/<?php echo get_template_directory_uri();?>/path/to/script.js”></script> <?php }