0
<?php

function load_stylesheets(){
wp_register_style('sj', get_template_directory_uri() . "/sj.css", array(), 1.0, 'all');

wp_enqueue_style('sj');
}

add_action('wp_enqueue_scripts', 'load_stylesheets');

?>

my custom css which is named sj.css is not being loaded, why? This is located in my function.php file.`

14
  • Edit your post. Remove everything and replace it with the code you are using to enqueue your css.
    – shanebp
    Commented Nov 20, 2020 at 21:34
  • People will only be able to help you if you provide more code examples - so they can help you locate the problem in what you are using.
    – Q Studio
    Commented Nov 20, 2020 at 23:38
  • I posted the code...but it is not appearing? Commented Nov 21, 2020 at 0:08
  • 1
    @JCSMOOTH345 it didn't show because you didn't use the right formatting, code needs to be in a code block, questions here use markdown formatting. I edited the Q to fix this, but you've provided no information about where this code is located, or what happens on the fronntend ( a 404 in the dev console? PHP fatal? )
    – Tom J Nowell
    Commented Nov 21, 2020 at 0:38
  • it will not load my css in my source code...one sec will post Commented Nov 21, 2020 at 0:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.