Hello guys. Am playing around with the child theme for Enigma and I found very difficult to make some changes to the theme appearance. I know that we can use !important rule in order to make changes but that is not the way it should be done properly.
I know that weblizar guys don’t really wan’t us to make changes but rather to buy the full PRO version with more features and I can understand that approach.
Despite all of my moaning, I would like to ask more advanced developers is my approach to make changes is actually at least “good”.
I was able to make changes I want in Enigma by creating my custom copies of stylesheets, putting them into the child theme root folder and adding following code to my functions.php within my child theme:
function load_my_styles() {
wp_dequeue_style( 'enigma-theme', get_template_directory_uri() . '../enigma/css/enigma-theme.css' );
}
add_action( 'wp_enqueue_scripts', 'load_my_styles', 400);
function load_child_stylesheet() {
wp_enqueue_style( 'enigma-new', get_stylesheet_directory_uri() . '/css/enigma-new.css' );
}
add_action( 'wp_enqueue_scripts', 'load_child_stylesheet', 300);
function load_default_stylesheet() {
wp_enqueue_style( 'default_new', get_stylesheet_directory_uri() . '/css/default-new.css' );
}
add_action( 'wp_enqueue_scripts', 'load_default_stylesheet', 200);
function load_main_stylesheet() {
wp_enqueue_style( 'style', get_stylesheet_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'load_main_stylesheet', 100);
Looking for any suggestions if I did something incorrectly or it could be achieved in more simple or more proper way.