Last active
April 25, 2016 22:01
-
-
Save geoffgraham/510e158ae56a77ed9e76 to your computer and use it in GitHub Desktop.
Modern Tribe - Enqueue tribe bar styles and scripts for non-calendar pages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tribehome_enqueue_front_page_scripts() { | |
// Add these scripts to only the front page -- need to customize for your specific use | |
if( is_front_page() ) | |
{ | |
//Add the stylesheet into the header | |
wp_enqueue_style("tribe.homepage",WP_PLUGIN_URL."/the-events-calendar/resources/tribe-events-full.css"); | |
wp_enqueue_style("tribe.homepage.date",WP_PLUGIN_URL."/tribe-homepage-search/css/datepicker.css"); | |
//Add the scripts in the footer | |
wp_enqueue_script("jquery"); | |
wp_enqueue_script( | |
"tribe.homepage.bar", WP_PLUGIN_URL."/the-events-calendar/resources/tribe-events-bar.js", | |
array("jquery"), "1.3.1",1); | |
wp_enqueue_script( | |
"tribe.homepage.events", WP_PLUGIN_URL."/the-events-calendar/resources/tribe-events.js", | |
array("jquery"), "1.3.1",1); | |
wp_enqueue_script( | |
"tribe.homepage.datepicker", WP_PLUGIN_URL."/tribe-homepage-search/js/bootstrap-datepicker.js", | |
array("jquery"), "1.3.1",1); | |
wp_enqueue_script( | |
"tribe.homepage.footer", WP_PLUGIN_URL."/tribe-homepage-search/js/footer.js", | |
array("jquery"), "1.3.1",1); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'tribehome_enqueue_front_page_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment