Answer the question
In order to leave comments, you need to log in
wp_enqueue_scripts hook not working?
Connected scripts and styles in VP. There were no results, after which I found the root of the problem - it was the "wp_enqueue_scripts" hook that did not work. I thought that the VP flew - reinstalled, the problem was not solved. Maybe I'm missing something important and it should not be activated under unspecified conditions? Here is a piece of code:
function agro_invest_scripts() {
wp_enqueue_style('main', get_template_directory_uri() . '/build/css/main.min.css');
wp_enqueue_style('theme', get_stylesheet_uri());
wp_enqueue_script('scripts', get_template_directory_uri() . '/build/js/main.min.js', [], _S_VERSION, true);
}
add_action('wp_enqueue_scripts', 'agro_invest_scripts');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question