Skip to content

Instantly share code, notes, and snippets.

@munts
Created March 9, 2017 16:48
Show Gist options
  • Save munts/3ad6c64a712d17ff92631efcef04e5f3 to your computer and use it in GitHub Desktop.
Save munts/3ad6c64a712d17ff92631efcef04e5f3 to your computer and use it in GitHub Desktop.
/**
* Including all required style files in the theme
*/
function theme_styles() {
wp_register_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css', array(), '1', 'all' );
wp_register_style('font-awesome.min', get_template_directory_uri() .'/assets/css/font-awesome.css', array(), null, 'all' );
wp_register_style('simple-line-icons', get_template_directory_uri() .'/assets/css/simple-line-icons.css', array(), null, 'all' );
wp_register_style('elegant-icons', get_template_directory_uri() .'/assets/css/elegant-icons.css', array(), null, 'all' );
wp_register_style('animate', get_template_directory_uri() .'/assets/css/animate.min.css', array(), null, 'all' );
wp_register_style('animsition', get_template_directory_uri() .'/assets/css/animsition.min.css', array(), null, 'all' );
wp_register_style('nivo', get_template_directory_uri() .'/assets/css/nivo-lightbox.css', array(), null, 'all' );
wp_register_style('drawer', get_template_directory_uri() .'/assets/css/bootstrap-drawer.css', array(), null, 'all' );
wp_register_style('main', get_template_directory_uri() .'/assets/css/main.css', array(), null, 'all' );
wp_register_style('styles', get_stylesheet_uri(), array(), '2.7.0','all' );
wp_enqueue_style( 'bootstrap' );
wp_enqueue_style( 'nivo' );
wp_enqueue_style( 'animate' );
wp_enqueue_style( 'font-awesome.min' );
wp_enqueue_style( 'simple-line-icons' );
wp_enqueue_style( 'elegant-icons' );
wp_enqueue_style( 'animsition' );
wp_enqueue_style( 'drawer' );
wp_enqueue_style( 'main' );
wp_enqueue_style( 'styles' );
/*** Google fonts-opensans */
wp_enqueue_style('one-opensans', '//fonts.googleapis.com/css?family=Open+Sans:400,600,700,800,300,400italic');
wp_enqueue_style('one-karla', '//fonts.googleapis.com/css?family=Karla:400,400i,700,700i');
}
add_action('wp_enqueue_scripts', 'theme_styles');
/**
* Include all required javascript files in the theme
*/
function berglund_scripts() {
//wp_enqueue_script('jQuery', get_template_directory_uri() . '/assets/js/jquery.min.js', array('jquery'), '1.0.0', true );
wp_enqueue_script('tether', get_template_directory_uri() . '/assets/js/joinable/tether.min.js', array(), '1.0.0', true );
wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array('jquery'), '1.0.0', true );
wp_enqueue_script('animsition', get_template_directory_uri() . '/assets/js/joinable/animsition.min.js', array(), '1.0.0', true );
wp_enqueue_script('auto-grow', get_template_directory_uri() . '/assets/js/joinable/autogrow.min.js', array(), '1.0.0', true );
wp_enqueue_script('hover-intent', get_template_directory_uri() . '/assets/js/joinable/hoverIntent.js', array(), '1.0.0', true );
wp_enqueue_script('isotope', get_template_directory_uri() . '/assets/js/joinable/isotope.pkgd.min.js', array(), '1.0.0', true );
wp_enqueue_script('nice-scroll', get_template_directory_uri() . '/assets/js/joinable/jquery.nicescroll.min.js', array(), '1.0.0', true );
//wp_enqueue_script('superfish', get_template_directory_uri() . '/assets/js/joinable/superfish.js', array('jquery'));
//wp_enqueue_script('imagesloaded', get_template_directory_uri() . '/js/imagesloaded.pkgd.min.js', array(), '1.0.0', true );
wp_enqueue_script('imagesloaded', get_template_directory_uri() . '/assets/js/joinable/imagesloaded.pkgd.min.js', array(), '1.0.0', true );
wp_enqueue_script('parallax', get_template_directory_uri() . '/assets/js/joinable/parallax.js', array(), '1.0.0', true );
wp_enqueue_script('nivo', get_template_directory_uri() . '/assets/js/joinable/nivo-lightbox.min.js', array(), '1.0.0', true );
wp_enqueue_script('drawer', get_template_directory_uri() . '/assets/js/joinable/drawer.js', array(), '1.0.0', true );
wp_enqueue_script('settings', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), '', true);
/*** Easing javascript file */
wp_enqueue_script('onepage-easing', 'http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js', array('jquery'), '', true);
}
add_action('wp_enqueue_scripts', 'theme_scripts');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment