Answer the question
In order to leave comments, you need to log in
How to solve the problem with including style.css in Wordpress?
The situation is as follows, I am transferring a simple layout to Wordpress.
In the theme folder, I created all the necessary files, including style.css and functions.php.
I wrote the following in functions.php.
<?php
add_action('wp_enqueue_scripts', 'test_media');
function test_media(){
wp_enqueue_style('test-main', get_template_directory_uri() . '/style.css');
wp_enqueue_script('test-script-main', get_template_directory_uri() . '/assets/js/script.js');
}
function test_media(){
wp_enqueue_style('test-main', get_stylesheet_uri());
wp_enqueue_script('test-script-main', get_template_directory_uri() . '/assets/js/script.js');
}
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