Skip to content

Instantly share code, notes, and snippets.

@rickalee
Last active January 2, 2016 10:29
Show Gist options
  • Save rickalee/8290577 to your computer and use it in GitHub Desktop.
Save rickalee/8290577 to your computer and use it in GitHub Desktop.
Migrate former Base Theme to Functions.php enqueues
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