Last active
January 2, 2016 10:29
-
-
Save rickalee/8290577 to your computer and use it in GitHub Desktop.
Migrate former Base Theme to Functions.php enqueues
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 swg_scripts() { | |
// Load our main stylesheet. | |
wp_enqueue_style( 'swg-style', get_stylesheet_uri() ); | |
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { | |
wp_enqueue_script( 'comment-reply' ); | |
} | |
wp_enqueue_script( 'swg-superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ), '20131209', true ); | |
wp_enqueue_script( 'swg-supersubs', get_template_directory_uri() . '/js/supersubs.js', array( 'jquery' ), '20131209', true ); | |
wp_enqueue_script( 'swg-script', get_template_directory_uri() . '/js/scripts.js', array( 'jquery' ), '20131209', true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'swg_scripts' ); | |
function swg_favicon() { | |
echo '<link rel="shortcut icon" type="image/x-icon" href="'.get_template_directory_uri().'/ui/favicon.ico">'; | |
} | |
add_action('wp_head', 'swg_favicon'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment