0

I’m watching an online course for WordPress development and at the beginning I attached the css file the exact like what the instructor did and tested it by adding some styles and it worked fine

Then when I start making some menus in the header.php the css file stops when I checking it with dev tool by chrome, the style.css is exist in “sources” but it’s empty even if I’m sure that the style.css isn’t empty I tried to watch the whole course again to apply every single line and got the same problem and I tried to delete the xamp and reinstall it and the same problem

enter image description here

enter image description here

  • 2
    You're missing a slash »/« before style.css. – Nicolai Jan 24 '18 at 17:12
  • 3
    Can you be more specific about what you mean by "it stops"? I can think of multiple things that could be ranging from a PHP syntax error, to broken CSS. Being able to see the contents of header.php would be helpful. Also, what's the name of the file shown in your screenshot? – Tom J Nowell Jan 24 '18 at 17:47
2

It looks like all you need is to add a trailing slash so the directory is correct.

Solution: change 'style.css' to '/style.css' in your second wp_register_style() call on line 7.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.