External CSS and JS links not working on my WordPress page

I’m trying to implement a vertical scroll menu on my WordPress page, but I’m facing issues with linking CSS and JavaScript files correctly.

Here’s what I’ve done so far:

  1. Created a folder and placed all my CSS and JavaScript files inside it.
  2. In WordPress, I set up a new page and added my HTML code in the section where I can edit the HTML directly.
  3. Attempted to link the required styles and scripts as shown below:
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/modernizr.js"></script>

While the HTML appears correctly, the CSS styles and JavaScript functionality are not applying. It seems like the files aren’t being loaded. Has anyone encountered this situation? I’m wondering if there’s a specific way WordPress handles external links or if I’ve overlooked something important.

WordPress blocks local files from random folders for security. Put your files in the WordPress directory structure instead. Upload to /wp-content/uploads/ and use the full URL like yoursite.com/wp-content/uploads/css/style.css. Or just paste the CSS directly into the page editor - messy but quick for testing.

Had the same issue when I started with WordPress. WordPress blocks direct file access because of its security setup. You’ve got to upload your CSS and JS files to the right spot first - use your hosting file manager or FTP. Drop them in /wp-content/themes/your-active-theme/ and reference them with the full path from your domain root. But honestly, you should use WordPress’s enqueue system in functions.php instead. It plays nice with other plugins and themes, plus WordPress handles caching and load order for you. When you insert files directly in HTML, you’re skipping WordPress’s asset management - that’s why nothing loads.

WordPress can’t find your CSS and JS files because you’re using relative paths. When you drop HTML directly into a page, WordPress doesn’t know where to look for those files. Upload your files to your theme folder or the media library, then use full URLs like wp-content/themes/your-theme-name/css/style.css. Better yet, do it the WordPress way - add them through your theme’s functions.php using wp_enqueue_style() and wp_enqueue_script(). This keeps everything loading in the right order and won’t break when other plugins load.