Last active
November 5, 2015 14:24
-
-
Save joecue/30814d49ef6091bf0d5a to your computer and use it in GitHub Desktop.
Sample WordPress Child Theme functions file
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
<?php | |
/* Add Parent Theme Styles */ | |
function demo_scripts() { | |
wp_enqueue_style( 'demo-framework-style', get_template_directory_uri() .'/style.css' ); | |
/* ----- Add Foundation Support From Parent Theme ----- */ | |
/* Add Foundation CSS */ | |
wp_enqueue_style( 'foundation-normalize', get_template_directory_uri() . '/foundation/css/normalize.css' ); | |
wp_enqueue_style( 'foundation', get_template_directory_uri() . '/foundation/css/foundation.css' ); | |
/* Add Foundation JS */ | |
wp_enqueue_script( 'foundation-js', get_template_directory_uri() . '/foundation/js/foundation.min.js', array( 'jquery' ), '1', true ); | |
wp_enqueue_script( 'foundation-modernizr-js', get_template_directory_uri() . '/foundation/js/vendor/modernizr.js', array( 'jquery' ), '1', true ); | |
/* Foundation Init JS */ | |
wp_enqueue_script( 'foundation-init-js', get_template_directory_uri() . '/foundation.js', array( 'jquery' ), '1', true ); | |
wp_enqueue_style( 'demo-style', get_stylesheet_directory_uri().'/style.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', ‘demo_scripts' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment