Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*=======================================
- Proper way to enqueue scripts and styles
- =======================================*/
- function themename_scripts(){
- if( !is_admin() ) {
- wp_enqueue_script('jquery');
- wp_enqueue_script( 'theme_name-bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery') );
- wp_enqueue_style( 'theme_name-style', get_stylesheet_uri() );
- wp_enqueue_style( 'theme_name-custom_style', get_template_directory_uri() . '/css/custom-style.css', array( 'theme_name-style' ));
- }
- if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); //wordpress comment style
- }
- add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement