Skip to content

Instantly share code, notes, and snippets.

@jazbek
Last active December 19, 2015 11:59
Show Gist options
  • Save jazbek/5951688 to your computer and use it in GitHub Desktop.
Save jazbek/5951688 to your computer and use it in GitHub Desktop.
<?php
add_action('wp_enqueue_scripts', 'enqueue_month_view_scripts');
function enqueue_month_view_scripts() {
Tribe_Template_Factory::asset_package('ajax-calendar');
Tribe_Template_Factory::asset_package('events-css');
}
?>
@neillmcshea
Copy link

Would that work?

@jazbek
Copy link
Author

jazbek commented Jul 8, 2013

That would totally work work, though convention would be to put the is_front_page() inside the function:

add_action('wp_enqueue_scripts', 'enqueue_month_view_scripts');
function enqueue_month_view_scripts() {
    if ( is_front_page() ) {
        TribeTemplateFactory::asset_package( 'ajax-calendar' );
    }
}

Either one! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment