R
R
Roman Basharin2017-01-07 03:14:52
WordPress
Roman Basharin, 2017-01-07 03:14:52

404 error when including styles on wordpress?

Rummaged through everything I can, I can't find a solution :( Help, guys.
Incoming data:
0. Server openserver (nginx + php7), WP latest - 4.7v.
1. Working with a self-made child theme longform-child (parent longform)
2 .The style files that need to be included are in
.../wp-content/themes/longform-child/lp/core
3. I include the following code in (functions.php of the child theme)

function add_custom() {
  wp_enqueue_style('core', get_stylesheet_directory_uri().'/lp/core/core.css', array(), '44');
}
add_action('wp_enqueue_scripts', 'add_custom');

4. What you need is added
... id='core-css'  href='http://my-domain.ru/wp-content/themes/longform-child/lp/core/core.css?ver=44' ...

The path is fully consistent with the one that should be, but when you open the file, a 404 error pops up. There are definitely no typos in the path to the file and the name of the file itself.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question