Snippets repository for WordPress developpers

Browse
//functions.php
function sp_register_scripts() {
  $theme_version = wp_get_theme()->get( 'Version' );
  // css
  wp_enqueue_style( 'snippress-style', get_stylesheet_uri(), array(), $theme_version );
  wp_enqueue_style( 'snippress-custom-styles', get_template_directory_uri() . '/assets/css/main.min.css' );
  // js
  wp_enqueue_script( 'main-script', get_template_directory_uri() . '/assets/js/main.min.js', array ( 'jquery' ), 1.1, true);
  wp_enqueue_script( 'slick', get_template_directory_uri() . '/assets/js/lib/script-name.min.js', array ( 'jquery' ), 1.1, true);
}
add_action( 'wp_enqueue_scripts', 'sp_register_scripts' );
Tags: ,

Categories

Tags