Skip to content

Commit

Permalink
fix: theme stylesheet order
Browse files Browse the repository at this point in the history
  • Loading branch information
enrimk authored Jul 26, 2023
1 parent ed91bd7 commit dfb8291
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,18 @@ function dci_scripts() {

//wp_deregister_script('jquery');

wp_enqueue_style( 'dci-wp-style', get_template_directory_uri()."/style.css" );
wp_enqueue_style( 'dci-font', get_template_directory_uri() . '/assets/css/fonts.css');
//load Bootstrap Italia latest css if exists in node_modules
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'node_modules/bootstrap-italia/dist/css/bootstrap-italia-comuni.min.css')) {
wp_enqueue_style( 'dci-boostrap-italia-min', get_template_directory_uri() . '/node_modules/bootstrap-italia/dist/css/bootstrap-italia-comuni.min.css');
}
else {
wp_enqueue_style( 'dci-boostrap-italia-min', get_template_directory_uri() . '/assets/css/bootstrap-italia.min.css');
}
wp_enqueue_style( 'dci-comuni', get_template_directory_uri() . '/assets/css/comuni.css');
wp_enqueue_style( 'dci-comuni', get_template_directory_uri() . '/assets/css/comuni.css', array('dci-boostrap-italia-min'));

wp_enqueue_style( 'dci-font', get_template_directory_uri() . '/assets/css/fonts.css', array('dci-comuni'));
wp_enqueue_style( 'dci-wp-style', get_template_directory_uri()."/style.css", array('dci-comuni'));


wp_enqueue_script( 'dci-modernizr', get_template_directory_uri() . '/assets/js/modernizr.custom.js');

Expand Down

0 comments on commit dfb8291

Please sign in to comment.