WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I uploaded a few .js files, so my js folder is in the root (The same level as wp-contents). I have a few .js files, but I just uploaded the masonry library and when I try to access it via domain.com/js/masory.js, it just goes to a 404. Is there something I am supposed to do with Wordpress ? The weird thing is, my other javascript in the same file works and it doesn't go to the 404.

For example, my custom.js (jQuery stuff) works, but the other doesn't:

<script language="javascript" type="text/javascript" src="http://domain.com/js/jquery.eachdelay-0.0.1.js"></script>
<script language="javascript" type="text/javascript" src="http://domain.com/js/jquery.masonry.min.js"></script>
share|improve this question

you should place your Javascript files in a subfolder of your theme rather than adding folders to the base structure of WP.

share|improve this answer

What I usually do is create a folder for the scripts inside the theme folder then place this line to the header.php

<script language="javascript" type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scriptsfolder/script.js"></script>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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