Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add calendar scripts to specific pages. Page builder themes rejoice!
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'template_redirect', 'my_add_ee_calendar_array' );
function my_add_ee_calendar_array() {
if ( class_exists( 'EED_Espresso_Calendar' ) && is_page( array(
'calendar', // change is_page() array items to match your calendar page slugs
// add more items here, be sure to include the comma before adding another line
) ) ) {
global $is_espresso_calendar;
$is_espresso_calendar = TRUE;
add_action( 'wp_enqueue_scripts', array( EED_Espresso_Calendar::instance(), 'calendar_scripts' ) );
if ( EED_Espresso_Calendar::instance()->config()->tooltip->show ) {
add_filter('FHEE_load_qtip', '__return_true' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment