Javascript not working in theme folder, only in root directory
-
I’m converting a PHP site into wordpress.
Original site: reedyindustries.com
Here’s the dev wordpress site of wordpress: https://reedy.wdev4.com/
Whenever I try to call the javascript file IN the WordPress Theme it won’t work! It will only work when I call the script in the root directory of the website.
DOESNT WORK:
<script src=”<?php bloginfo(‘template_url’); ?>/js/script.js”></script>WORKS:
<script src=”js/script.js”></script>This is the script file: https://reedy.wdev4.com/js/script.js
Why won’t it work in the theme folder? (PS all the files needed to run the script file such as images folder has been placed in the root directory and the theme folder in the same structure layout as it originally was.
- The topic ‘Javascript not working in theme folder, only in root directory’ is closed to new replies.