Skip to content

Instantly share code, notes, and snippets.

@geilt
Created March 27, 2013 19:33
Show Gist options
  • Save geilt/5257319 to your computer and use it in GitHub Desktop.
Save geilt/5257319 to your computer and use it in GitHub Desktop.
Register Scripts and Styles for Wordpress. Put this in functions.php
<?php
add_action('wp_enqueue_scripts', 'register_my_scripts');
if(!function_exists('register_my_scripts')):
function register_my_scripts() {
//wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
wp_enqueue_script('scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery') );
//wp_enqueue_style( $handle, $src, $deps, $ver, $media );
wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css', false, false, 'screen' );
}
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment