Subfolders in a WordPress theme

Mar 13, 2012   //   by phpfreelancer.biz   //   Blog, Wordpress Theme Tutorial  //  No Comments

I created a child theme with subfolders Images and scripts.

<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/Images/jquery.scrollTo-min.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/Images/jquery.localscroll-min.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/Images/jqueryslidemenu-min.js"></script>

The problem is, when I direct link files that are inside the Scripts folder, clicking on the url in the source file will direct me to my 404 page of my blog. But if I put it in my Images folder, it would load the script normally.How can I allow my Script subfolder to be access directly?

To fix this problem:
check the reading and writing permissions of your folders. It could be that the scripts folder needs a higher permission level due to the fact that you have to run scripts.

When you access your ftp account go to the folders images and scripts. Right click on the script folder and look for something like chmod, or reading/writing permissions.

The permissions should be the following:

All Files that are not scripts or directories 
644 = -rw-r--r--

All directories and anything that looks like a script (.cgi and .pl files for example) 
755 = -rwxr-xr-x

Leave a comment

Share This Post

RSS Wordpress News