Skip to content

Instantly share code, notes, and snippets.

@justinwhall
Last active January 4, 2018 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinwhall/1208af7d85ddb2400162096de2f1b411 to your computer and use it in GitHub Desktop.
Save justinwhall/1208af7d85ddb2400162096de2f1b411 to your computer and use it in GitHub Desktop.
<?php
/**
* Enqueue scripts and styles.
*/
function justinwhallv5_scripts() {
// Remove jQuery from the public side
if ( ! is_admin() ) {
wp_deregister_script( 'jquery' );
}
// Let's also get rid of ContactForm7's script
wp_deregister_style( 'contact-form-7' );
// Theme CSS and JS file
wp_enqueue_style( 'justinwhallv5-style', get_stylesheet_directory_uri() . '/assets/dist/justinwhall.css', array(), JUSTINWHALL_VERSION );
wp_enqueue_script( 'justinwhall-scripts', get_stylesheet_directory_uri() . '/assets/dist/justinwhall.min.js', array( ), JUSTINWHALL_VERSION, true );
}
add_action( 'wp_enqueue_scripts', 'justinwhallv5_scripts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment