Answer the question
In order to leave comments, you need to log in
Why is the theme stylesheet loading in the WordPress admin?
Tell me what's wrong?
There is a task to include a css file (but not the theme's default style.css, but style.min.css). And also add the ability to overwrite the version number of the file. I did it like this in functions.php:
wp_enqueue_style( 'style-theme', get_template_directory_uri() . '/style.min.css', array(), '1.0.0', 'all');
Answer the question
In order to leave comments, you need to log in
Well, don’t load the style in the admin panel - it’s business then ...
<?php
if(!is_admin()) { wp_enqueue_style( 'style-theme', get_template_directory_uri() . '/style.min.css', array(), '1.0.0', 'all');
}
?>
I'm not 100% ready to say that the right solution will be, but at least fix "style-theme" to style.min
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question